1 |
÷ Sun, 11 May 2014 18:26:32 -0500 |
2 |
Gordon Pettey <petteyg359@×××××.com> ÐÉÛÅÔ: |
3 |
|
4 |
> A lot of small files (e.g. AUTHORS, ChangeLog |
5 |
> |
6 |
> FWIW: On my system, I have 59M of bz2 files in /usr/share/man and |
7 |
> /usr/share/doc. A short script to decompress those and recompress with xz |
8 |
> -6e reduced that to 36M. |
9 |
|
10 |
Very strange o_O |
11 |
|
12 |
Here is my test results. xz options: "--lzma2=preset=6e,dict=4MiB". |
13 |
Larger dictionary size does not improve compression ratio, I get |
14 |
even worse results with just "-6e" or "-9e". man-bz2 is a full copy of |
15 |
my /usr/share/man, man-xz is a recompressed one. |
16 |
|
17 |
Size comparison: |
18 |
|
19 |
$ du -s man-bz2/ man-xz/ |
20 |
82032 man-bz2/ |
21 |
82308 man-xz/ |
22 |
|
23 |
|
24 |
Decompression speed: |
25 |
|
26 |
$ time find man-bz2/ -type f -name "*.bz2" -exec bzcat '{}' > /dev/null \; |
27 |
|
28 |
real 0m35.110s |
29 |
user 0m14.509s |
30 |
sys 0m15.227s |
31 |
$ time find man-bz2/ -type f -name "*.bz2" -exec bzcat '{}' > /dev/null \; |
32 |
|
33 |
real 0m35.407s |
34 |
user 0m14.432s |
35 |
sys 0m15.186s |
36 |
$ time find man-xz/ -type f -name "*.xz" -exec xzcat '{}' > /dev/null \; |
37 |
|
38 |
real 0m46.571s |
39 |
user 0m17.077s |
40 |
sys 0m23.906s |
41 |
$ time find man-xz/ -type f -name "*.xz" -exec xzcat '{}' > /dev/null \; |
42 |
|
43 |
real 0m46.137s |
44 |
user 0m17.276s |
45 |
sys 0m23.426s |
46 |
|
47 |
|
48 |
As you can see, xz is actually worse in speed and compression ratio. |
49 |
|
50 |
-- |
51 |
Alexander Tsoy |