Hi again, Mirabile encouraged me to write a follow-up with some other info, along with making a note that he likes this idea.
It seems it isn't clear that the active JFFS2 filesystem changes will still be compressed by ZLIB. JFFS2 BBC supports any number of compressors. Each block header has with it an identifier of the encoder used for that block. Available encoders/decodes (after my LZMA extension): #define JFFS2_COMPR_NONE 0x00 #define JFFS2_COMPR_ZERO 0x01 #define JFFS2_COMPR_RTIME 0x02 #define JFFS2_COMPR_RUBINMIPS 0x03 #define JFFS2_COMPR_COPY 0x04 #define JFFS2_COMPR_DYNRUBIN 0x05 #define JFFS2_COMPR_ZLIB 0x06 #define JFFS2_COMPR_LZMA 0x07 Encoders are selected based on their pre-defined priority/rank, which in the JFFS2 file system driver is actually just the ordering of the code. So if ZLIB has the highest rank, a data block is tried to be compressed with it first, and it falls back to RTIME (the only other active encoding algorithm) if compression fails, then no compression used (JFFS2_COMPR_NONE). Therefore, adding LZMA decoding support to the JFFS2 filesystem driver is a simple matter of adding the LZMA decoder and a case statement to handle blocks with the JFFS2_COMPR_LZMA encoder type. The jffs2_compress function simply doesn't know of LZMA, so tries ZLIB, RTIME, and then NONE. When an LZMA encoder is available, I simply have to add a try of LZMA before ZLIB (or replace ZLIB with LZMA). - Jeremy Collake ([EMAIL PROTECTED]) _______________________________________________ freewrt-developers mailing list [email protected] https://www.freewrt.org/lists/listinfo/freewrt-developers
