History log of /external/squashfs-tools/squashfs-tools/compressor.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e450e8c73bdaf5ca4a7bccab3e7f9c55a7d21e94 28-Dec-2013 Phillip Lougher <phillip@squashfs.org.uk> lzo_wrapper: new implementation

Add a new LZO implementation which supports multiple LZO
compression algorithms, with the addition of compressor
command line options to select which algorithm is used,
together with all the other bits which need to be added to
support the "compression option" framework.

Two new compressor options have been added:

1. -Xlzo_algo <algorithm>

Select LZO compression algorithm <algorithm>

Five LZO compression algorithms are now supported, these
algorithms are the ones supported by the kernel.

lzo1x_1
lzo1x_1_11
lzo1x_1_12
lzo1x_1_15
lzo1x_999

If no compression algorithm is specified, then default to
"lzo1x_999" which is the algorithm used by the previous LZO
implementation.

lzo1x_1 is faster than lzo1x_999, but it gives worse compression,
the lzo1x_1_xx algorithms are variants of lzo1x_1 with differing
memory requirements (at compress time), and varying compression levels.

2. -Xcompression_level <compression level>

Select compression level for the lzo1x_999 algorithm, this can
be between 1 and 9 (1 <= n <= 9).

If no compression level is specified, then default to 8, which
is the compression level used by the previous LZO implementation.

Note, -Xcompression_level is only applicable to the lzo1x_999
algorithm, as the other algorithms do not support compression
levels (the lzo1x_1_xx algorithms are in effect different
compression levels on the basic lzo1x_1 algorithm).

As mentioned above, if no -X compression options are used,
the new code defaults to the compression used by the original
LZO code.

Additionally, the new code now calls lzo1x_optimize() which
should be called to optimise the LZO compressed data after
compression.

Generally speaking, without -X compression options, the behaviour
should be the same as the original implementation. If you wish
better compression, then you can bump the compression level up to 9.
If you wish quicker compression, then use one of the lzo1x_1
algorithms, or use a compression level less than 8 with the
lzo1x_999 algorithm.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/compressor.c
2b77610f636a91dcd4ee15212d7f5b09e50b84c0 27-Aug-2013 Phillip Lougher <phillip@squashfs.org.uk> lzo_wrapper: Remove current implementation!

There has been numerous complaints against the LZO implementation,
namely that it takes longer to compress than GZIP, but produces
worse compression. As such for mksquashfs, it makes no sense
to use LZO compression to reduce build time when producing
experimental images.

The latest "complaint" is:
http://sourceforge.net/p/squashfs/support-requests/3

I produced an implementation of LZ4 for Squashfs, which as LZ4
is extremely fast at compression, I intended this to be used
as an extremely fast build time option for building experimental
images. But, I have received unexpected resistance to adding
LZ4 support to Squashfs in the kernel, and so it's basically
back to the drawing board.

I have decided to re-write the LZO implementation, adding
support for different LZO compression algorithms, with the
addition of compressor command line options to select which
algorithm is used, together with all the other bits which
need to be added to support the "compression option" framework.

Note the original implementators of the LZO support can't be blamed for
not adding this support, because the "compression options" framework
didn't exist when the implementation was made!

The current LZO wrapper has an implemention for the lzo1x_999_compress
algorithm, this has to be completely rewritten to deal gracefully with the
ability to deal with multiple compression algorithms (a table of the
different compressors, and function pointers to the appropriate
function), and so the current implementation is not salvageable.

The LZ4 implementation incorporates the necessary support for the
compression options framework, and this code can be reused in the new
LZO wrapper, recouping some of the "wasted" effort in its implementation.

So, on the one-hand the current LZO implementation lacks salvageable code, and
on the other hand, the LZ4 implementation incorporates a compression
options framework which can be reused in the new LZO wrapper.

So, it makes sense to remove the current implementation, and base the
new implementation on the LZ4 wrapper.

Signed-off-by: Phillip Lougher <phillip@squashfs.rg.uk>
/external/squashfs-tools/squashfs-tools/compressor.c
2d4c918a517cc567ca935c352e3993133d39945f 17-Jun-2013 Phillip Lougher <phillip@squashfs.org.uk> lz4: add experimental support for lz4 compression

* IMPORTANT HIGHLY EXPERIMENTAL * only use for experimental
testing of lz4 compression. LZ4 compressed filesystems produced
by this code will be guaranteed to become unreadable in a couple of
days!

This code produces "legacy" LZ4 format compression - this is the
format supported by the LZ4 kernel code currently in linux-next.

It is currently unclear whether the kernel code expects the LZ4
magic to be present - if so this has to be explictly added as it is not
generated by the LZ4 calls.

More importantly, it is unclear whether in the long term the
kernel code will continue to use the "legacy" format or move to the
more complicated newer format.

Due to this it is important to mark these LZ4 compressed streams as
using "legacy" format, to enable the code to distinquish between
"legacy" format and the newer format, in the event the kernel code
moves to the newer format.

This could be achieved by having two compression types, LZ4 == legacy, and
LZ4_XXX for any newer format, but this is messy, and makes an
unnecessary distinction (at the level of the compression type) between
the formats.

A better option is to make comp_opts (compression options) mandatory
for LZ4, and this comp_opt structure will encode the version of the
format, which will be used in the event the legacy format is superseded
in the kernel.

Currently this code lacks setting a comp_opts structure. In the
near future this code will be added, and the presence of the
comp_opts structure in the filesystem will become mandatory - and
any filesystems generated by this code will become unreadable. You have
been warned!

Checking into lz4 branch for this reason!

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/compressor.c
83d42a3fc898962aa1f1e8387f2ccb1114e0d294 01-Nov-2012 Phillip Lougher <phillip@squashfs.org.uk> Update email address

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/compressor.c
8db6d288d01afc5464965b0bde8106cd7360c543 16-Oct-2012 Phillip Lougher <phillip@squashfs.org.uk> Update copyright dates

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/compressor.c
0d3bad2f4d40cfca04d3b4c38cc6920dde8aae91 13-Apr-2011 Phillip Lougher <phillip@lougher.demon.co.uk> compressors: mksquashfs/unsquashfs broken if GZIP_SUPPORT is not defined

Fix mistake in gzip_comp_ops structure used when no GZIP_SUPPORT
is defined. The missing NULLs in the structure caused
mksquashfs/unsquashfs to believe no compressors were present.

While fixing this also make the long sequence of NULLs unnecessary
by rearranging the structure. This ensures that this bug should
not arise in the future as the unsupported compressor structures now
don't need to be updated every time the number of compressor
functions are changed.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
/external/squashfs-tools/squashfs-tools/compressor.c
8adfde28bf0af1a7dcd99d8f7ba8707d4ea2cd62 28-Dec-2010 plougher <plougher> Add extract_options call to compressor framework - this allows mksquashfs
on appending to set the compressor specific options from the
compression options data extracted from the file system.
/external/squashfs-tools/squashfs-tools/compressor.c
a916222d81c4d1bda3c67b3abfb88bb0a5148386 25-Dec-2010 plougher <plougher> Add new options_post() call to compressor framework. This allows the
compressor to check options for validity after all the options
have been parsed
/external/squashfs-tools/squashfs-tools/compressor.c
1f0d423e9fbbf643279833e9e19f7dd6ffb25374 25-Dec-2010 plougher <plougher> Add dump_options() to compressor framework - this is to allow each
compressor to produce it's packed version of compressor specific
options for writing to the filessystem.
/external/squashfs-tools/squashfs-tools/compressor.c
31b115cbe7418197456664f1fd50e03ed94049c5 08-Dec-2010 plougher <plougher> Add compression framework support for the display of compressor specific
options.
/external/squashfs-tools/squashfs-tools/compressor.c
94d3317e4cd6a7f9649b4cc92e79d0c09b4ee72f 24-Nov-2010 plougher <plougher> Add an init() function to the compressor framework that allocates any
necessary compressor workspace. This replaces the workspace allocation
that used to take place on the first call to compress().
/external/squashfs-tools/squashfs-tools/compressor.c
67dfce9c3751f0580633e8a33cea28bcfbefec04 23-Nov-2010 plougher <plougher> Add initial support for XZ compression - no filters are currently supported
/external/squashfs-tools/squashfs-tools/compressor.c
761cbf49b7f281fa24822177ff1b8245179b01cc 23-Nov-2010 plougher <plougher> Fix multiple definitions warning
/external/squashfs-tools/squashfs-tools/compressor.c
376b4a7fc464ce9f26f920db3737a3bff8ce76a7 23-Nov-2010 plougher <plougher> Move compressor ops definitions to their specific wrapper files, this allows
the wrapper file functions to be made static
/external/squashfs-tools/squashfs-tools/compressor.c
4da4bd4fd48c3b092962b58133c09ba8effcfcab 21-Nov-2010 plougher <plougher> Add support for compressor specific options (specified by -Xxxxx).
/external/squashfs-tools/squashfs-tools/compressor.c
00a9365ae85fd3b0f89ca7613f3da2a6b44c7f9f 21-Nov-2010 plougher <plougher> Add XZ_COMPRESSION type (added as unsupported)
/external/squashfs-tools/squashfs-tools/compressor.c
76b7c832bb72020749efcef5cdc8fefffac87f25 14-Sep-2010 plougher <plougher> Make gzip support optional (build time selectable). By default gzip is
supported.
/external/squashfs-tools/squashfs-tools/compressor.c
c801ba5494e53c5cad6c16241bdad01b3de33717 14-Sep-2010 plougher <plougher> Add glue code for LZO compression
/external/squashfs-tools/squashfs-tools/compressor.c
e80f5c85abc4160f60a384fffec759900147f494 25-Aug-2010 plougher <plougher> Fix copyright dates - these files didn't exist before 2009!
/external/squashfs-tools/squashfs-tools/compressor.c
13df178e33c56016f95b72a33b79c0747b77f1a3 29-Aug-2009 plougher <plougher> Move (De)Compressors available message out of display_compressors()
function, and fix the output to go to stdout
/external/squashfs-tools/squashfs-tools/compressor.c
764dab5cd71bda25bc755de08908dbbd58c1a450 24-Aug-2009 plougher <plougher> Enable compression default to be selected via Makefile
/external/squashfs-tools/squashfs-tools/compressor.c
52a452e54bf1da51f608c6df98d1e0a66c35453e 07-Aug-2009 plougher <plougher> Make display_compressors() take an indent string
/external/squashfs-tools/squashfs-tools/compressor.c
ee2cab0213cfbebbfc27b5ed90103b44069b2376 06-Aug-2009 plougher <plougher> Add lzma compression
/external/squashfs-tools/squashfs-tools/compressor.c
fe958c39192aa4c164427e4307ce1b121c6eedfb 03-Aug-2009 plougher <plougher> Add function to display available compressors and remove unnecessary
compressor enumerator
/external/squashfs-tools/squashfs-tools/compressor.c
38a1a15798c58955704f8baae930804f49ce1ff8 30-Jul-2009 plougher <plougher> Add outline support for LZMA compression
/external/squashfs-tools/squashfs-tools/compressor.c
0c3ea735a7954554729df4d7a4f6ff4dcf9a2d0f 30-Jul-2009 plougher <plougher> Add uncompress operation, and add lookup by id. Also add supported flag
so a compressor type can in the table but flagged as not suuported (this
is to allow ids to be easily resolved to names)
/external/squashfs-tools/squashfs-tools/compressor.c
8a894297aee1af904c88001fa94a5aa2201710b3 29-Jul-2009 plougher <plougher> Add new compressor framework. This allows different compression
algorithms to be used.
/external/squashfs-tools/squashfs-tools/compressor.c