Krzysztof Lichota wrote the following on 17.12.2007 13:05

recently i also tried 7z for my backups and in comparation to bz2 it seems to
take a bit longer during compressing but is faster on extraction.
Also the compressed file with 7z is ~30% compared to a bz2 one.


</snip>


> It is hard to judge best compression using only one package. It is
> possible that for other packages other compression schemes would be
> better. Have you run built other packages? ?The best would be to rebuild
> whole repo with new compression scheme and compare the results, so that
> it does not appear, for example, that packages stop fitting into one CD.

atached is a more detailed analysis trying to compare gz, bz2 and 7z (aka LZMA).
I tried it once for (mostly) textfiles as source and once on a binary file in
both compressing and extraction.

</snip>

>       Krzysztof Lichota

HTH
-- 
Thilo

key: 0x4A411E09
compressing binary
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

$ which tarbz2
tarbz2 is aliased to `/bin/tar --bzip2 -cvpf'

$ which targz
targz is aliased to `/bin/tar -cvzpf'




$ du --max-depth=1 -k openoffice.org-core_1%3a2.3.0-1ubuntu5.3_i386.deb
36996   openoffice.org-core_1%3a2.3.0-1ubuntu5.3_i386.deb


$ time tarbz2 oo.tar.bz2 openoffice.org-core_1%3a2.3.0-1ubuntu5.3_i386.deb
real    0m19.243s
user    0m18.761s
sys     0m0.156s

$ ls -lk oo.tar.bz2
-rw------- 1 USER USER 36931 17.12.2007 15:23 oo.tar.bz2


$ time tar cf - openoffice.org-core_1%3a2.3.0-1ubuntu5.3_i386.deb  |  7za  a  
-si oo.tar.7z
real    0m32.141s
user    0m30.506s
sys     0m0.312s

$ ls -lk oo.tar.7z
-rw------- 1 USER USER 37014 17.12.2007 15:24 oo.tar.7z


$ time tar cf - openoffice.org-core_1%3a2.3.0-1ubuntu5.3_i386.deb | 7za a -si 
-m0=lzma oo-lzma.tar.7z
real    0m31.555s
user    0m30.762s
sys     0m0.324s

$ ls -lk oo-lzma.tar.7z
-rw------- 1 USER USER 37014 17.12.2007 15:27 oo-lzma.tar.7z


$ time targz oo.tar.gz openoffice.org-core_1%3a2.3.0-1ubuntu5.3_i386.deb      
real    0m3.316s
user    0m2.988s
sys     0m0.140s

$ ls -lk oo.tar.gz
-rw------- 1 USER USER 36723 17.12.2007 15:29 oo.tar.gz





extracting binary
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

$ which untarbz2
untarbz2 is aliased to `/bin/tar --bzip2 -xvpf'

$ which untargz
untargz is aliased to `/bin/tar -xvzpf'



$ time untarbz2 oo.tar.bz2
real    0m8.522s
user    0m8.205s
sys     0m0.232s

$ ls -lk open*
-rw------- 1 USER USER 36951 17.12.2007 15:20 
openoffice.org-core_1%3a2.3.0-1ubuntu5.3_i386.deb


$ time untargz oo.tar.gz
real    0m0.636s
user    0m0.484s
sys     0m0.128s

$ ls -lk open*
-rw------- 1 USER USER 36951 17.12.2007 15:20 
openoffice.org-core_1%3a2.3.0-1ubuntu5.3_i386.deb


$ time 7za x -so oo.tar.7z | tar xf -       
real    0m5.849s
user    0m5.616s
sys     0m0.176s

$ ls -lk open*
-rw------- 1 USER USER 36951 17.12.2007 15:20 
openoffice.org-core_1%3a2.3.0-1ubuntu5.3_i386.deb
compressing mostly textfiles
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

$ which tarbz2
tarbz2 is aliased to `/bin/tar --bzip2 -cvpf'

$ which targz
targz is aliased to `/bin/tar -cvzpf'




$ du --max-depth=1 -k | grep delta
108444  ./delta


$ time tarbz2 delta.tar.bz2 delta/
real    0m48.591s
user    0m38.234s
sys     0m0.524s

$ ls -lk delta.tar.bz2
-rw------- 1 USER USER 65152 17.12.2007 14:48 delta.tar.bz2



$ time tar cf - delta/  |  7za  a  -si  delta.tar.7z
real    1m1.577s
user    0m59.928s
sys     0m0.448s

$ ls -lk delta.tar.7z
-rw------- 1 USER USER 13977 17.12.2007 14:56 delta.tar.7z


$ time tar cf - delta/ | 7za a -si -m0=lzma delta-lzma.tar.7z
real    1m1.268s
user    0m59.936s
sys     0m0.404s

$ ls -lk delta-lzma.tar.7z
-rw------- 1 USER USER 13977 17.12.2007 14:58 delta-lzma.tar.7z


$ time targz delta.tar.gz delta/
real    0m11.449s
user    0m10.213s
sys     0m0.292s

$ ls -lk delta.tar.gz
-rw------- 1 USER USER 66371 17.12.2007 14:59 delta.tar.gz








extracting mostly textfiles
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

$ which untarbz2
untarbz2 is aliased to `/bin/tar --bzip2 -xvpf'

$ which untargz
untargz is aliased to `/bin/tar -xvzpf'




$ time untarbz2 delta.tar.bz2
real    0m20.017s
user    0m18.173s
sys     0m0.824s

$ du --max-depth=1 -k
108444  ./delta



$ time untargz delta.tar.gz
real    0m8.205s
user    0m1.856s
sys     0m0.420s

$ du --max-depth=1 -k
108444  ./delta


$ time 7za x -so delta.tar.7z | tar xf -
real    0m5.030s
user    0m3.136s
sys     0m0.452s

$ du --max-depth=1 -k
108444  ./delta
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss

Reply via email to