Saturday, November 20, 2010

Kompresja bzip2, xz, 7-Zip

grzesiek@home:~$ ls -lh kalkulator-0.0.1.ogv
-rw-r--r-- 1 grzesiek grzesiek 46M 2009-12-01  kalkulator-0.0.1.ogv

grzesiek@home:~$ time bzip2 -z9 kalkulator-0.0.1.ogv 
real 0m10.539s
user 0m10.425s
sys 0m0.108s

grzesiek@home:~$ ls -lh kalkulator-0.0.1.ogv.bz2
-rw-r--r-- 1 grzesiek grzesiek 44M 2009-12-01  kalkulator-0.0.1.ogv.bz2

grzesiek@home:~$ time bzip2 -d kalkulator-0.0.1.ogv.bz2
real 0m5.772s
user 0m5.608s
sys 0m0.140s

grzesiek@home:~$ time xz -z9 kalkulator-0.0.1.ogv 
real 0m22.685s
user 0m22.249s
sys 0m0.420s

grzesiek@home:~$ ls -lh kalkulator-0.0.1.ogv.xz
-rw-r--r-- 1 grzesiek grzesiek 34M 2009-12-01  kalkulator-0.0.1.ogv.xz

grzesiek@home:~$ time xz -d kalkulator-0.0.1.ogv.xz
real 0m3.283s
user 0m3.168s
sys 0m0.112s

grzesiek@home:~$ xz
xz       xzcat    xzcmp    xzdiff   xzegrep  xzfgrep  xzgrep   xzless   xzmore

grzesiek@home:~$ time 7z a -mx=9 kalkulator-0.0.1.ogv.7z kalkulator-0.0.1.ogv
7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30
p7zip Version 9.04 (locale=pl_PL.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)
Scanning

Creating archive kalkulator-0.0.1.ogv.7z

Compressing  kalkulator-0.0.1.ogv    

Everything is Ok

real 0m10.705s
user 0m20.781s
sys 0m0.472s

grzesiek@home:~$ ls -lh kalkulator-0.0.1.ogv*
-rw-r--r-- 1 grzesiek grzesiek 46M 2009-12-01  kalkulator-0.0.1.ogv
-rw-r--r-- 1 grzesiek grzesiek 34M 11-20 21:09 kalkulator-0.0.1.ogv.7z

grzesiek@home:~$ mv kalkulator-0.0.1.ogv _kalkulator-0.0.1.ogv
grzesiek@home:~$ time 7z e kalkulator-0.0.1.ogv.7z

7-Zip 9.04 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-05-30
p7zip Version 9.04 (locale=pl_PL.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

Processing archive: kalkulator-0.0.1.ogv.7z

Extracting  kalkulator-0.0.1.ogv

Everything is Ok

Size:       48065852
Compressed: 34814347

real 0m3.663s
user 0m3.572s
sys 0m0.092s


Obydwa rozwiązania korzystają z LZMA:

No comments:

Post a Comment