#3 Compression options

v1.0 (example)
open
nobody
None
5
2013-07-22
2013-07-22
Steve Kieu
No

Two points:

  1. the lzo compress we use is very slow (test it, it even slower than the default gzip 9 in my machine) and it produce even bigger squashfs image compare with the faster lzo compression

Thus I suggest we can use: lzo1x_1_15_compress instead of lzo1x_999_compress. I tested myself, it is much faster to compress and the output file size is even smaller.

  1. Add an option to allow gzip level rather than hard coded to 9. For example Gzip 4 which make it much less CPU time and produce just a bit bigger size but tehre is no way to set it now

(Well I did a quick hack by let mksquashfs read the environment GZIP_LEVEL and use it like this in gzip_wrapper.c

   char * gzlevel = getenv("GZIP_LEVEL");
    if (! gzlevel) gzlevel = "4";
    res = deflateInit(stream, atoi(gzlevel));

but it should be a permanent option. I had a quick look of how it should be implemented but find it hard to implement as it talk to a generic wrapper - and it handles it a bit complex to me)

Thanks

Discussion