В Sun, 11 May 2014 18:26:32 -0500
Gordon Pettey <[email protected]> пишет:
> A lot of small files (e.g. AUTHORS, ChangeLog
>
> FWIW: On my system, I have 59M of bz2 files in /usr/share/man and
> /usr/share/doc. A short script to decompress those and recompress with xz
> -6e reduced that to 36M.
Very strange o_O
Here is my test results. xz options: "--lzma2=preset=6e,dict=4MiB".
Larger dictionary size does not improve compression ratio, I get
even worse results with just "-6e" or "-9e". man-bz2 is a full copy of
my /usr/share/man, man-xz is a recompressed one.
Size comparison:
$ du -s man-bz2/ man-xz/
82032 man-bz2/
82308 man-xz/
Decompression speed:
$ time find man-bz2/ -type f -name "*.bz2" -exec bzcat '{}' > /dev/null \;
real 0m35.110s
user 0m14.509s
sys 0m15.227s
$ time find man-bz2/ -type f -name "*.bz2" -exec bzcat '{}' > /dev/null \;
real 0m35.407s
user 0m14.432s
sys 0m15.186s
$ time find man-xz/ -type f -name "*.xz" -exec xzcat '{}' > /dev/null \;
real 0m46.571s
user 0m17.077s
sys 0m23.906s
$ time find man-xz/ -type f -name "*.xz" -exec xzcat '{}' > /dev/null \;
real 0m46.137s
user 0m17.276s
sys 0m23.426s
As you can see, xz is actually worse in speed and compression ratio.
--
Alexander Tsoy