JFFS2 improvement project

University of Szeged

Home - Mount time - Compression - JFFS3

What is BBC?

BBC is the name of the project (Block Based Compression framework for JFFS2). The goal of it is to increase the compression performance of JFFS2.

How does it work?

JFFS2 already has a compression feature, it uses ZLIB for compression. BBC replaces ZLIB with a compressor framework, which is able to use an arbitary set of compressors.

A relevant limitation of the efficiency of compressors is that JFFS2 splits the information into 4KB blocks and compresses them individually. BBC allows to use model-based compressors (and also non-model-based such as ZLIB). A model-based one can collect information about the file structure before making the file system image, and can use this (model) information during (de)compressing blocks.

What kind of compressors are supported by BBC?

The BBC framework uses the compressors through an interface. Currently the following compressor are supported:

  • zlib: Certainly :)
  • armlib: This is our model based compressor, designed for ARM code compression
  • lzo: LZO1X-1 and LZO1X-999 compression with/without optimization
  • lzss: Lempel-Ziv-Storer-Szymanski compression
  • lzari: Lempel-Ziv-Arithmetic coding compression
  • lzh-d: Lempel-Ziv-(dynamic) Huffman compression

How can I download and use it?

BBC is under inserting into the official JFFS2 (you can download it from MTD CVS). To fully implement all features (already exists in the old source and old documentation) takes some time and needs some partial rewrites.

Features commited to JFFS2 and mkfs.jffs2

  • new compressor interface
  • compression modes: none, prioriry (default), size
  • proc inteface (set compression mode, compressor priorities, read stats...)
  • 2 new compressors (lzari, lzo)

What is missing in this rewritten version?

  • model file support
  • model based compressors (armlib)
You can download a pending patch from here. (warning: it is a little bit old!)