Brotli、Deflate、Zopfli、LZMA、LZHAM、Bzip2六種無損數據壓縮性能比較


  這里比較了六種數據壓縮算法,結果表明Brotli算法會代替普遍使用的Deflate算法。分別用Canterbury compression corpus,web contentcorpus,和 enwik8三種不同的數據集來測試,並比較六種算法在壓縮比和壓縮速度上的性能。而且,也表明了Zopfli,LZMA,LZHAM,和 bzip2在壓縮和解壓縮時占用CPU時間較長,不會直接代替deflate。

  Deflate不僅能支持很好的適配現在已有的系統,而且它比較簡單快速的編解碼。因此,很多無損數據壓縮都采用Deflate方法實現的。2013年,谷歌發布Zopfli,改算法不僅兼容Deflate格式,而且支持稠密壓縮。現在Zopfli逐漸廣泛被接收,有人開始提出目前應該從Deflate算法向更加先進的算法轉變。Brotli是谷歌開發的一個新一代的壓縮算法。這里將該算法和其他已有的壓縮算法進行一個比較。  

CPU

intel@Xeon CPU E5-1650 v2, 3.5G, 6 core

操作系統

Linux 3.13.0

編譯器

GCC 4.8.4

單線程

singel

測試文件1

Canterbury compression corpus

測試文件2

A web content, 1285 files and 70611753 bytes

測試文件3

Ebwik8 single file 100M

 

 

 

 

 

 

 

 

 

 

 

LZMA和LAHMA算法,窗口越大,壓縮速度越慢,壓縮比越高。

 

窗口大小(bit)

版本

Brotli

NA

Brotli version 0.2.0

Deflate

15

Deflate algorithm from zlib 1.2.8

Zopfli

15

Zopfli version from github 20150901

LZMA

22

LZMA implementation in 7zip 9.20.1

LZHAM

22

LZHAM 1.0 stable 1

Bzip2

NA

Bzip2 1.0.0 20100906

 

        

 

 

 

 

 

 

 

 

測試結果 

Canterbury compression corpus

算法:級別

壓縮比

壓縮速度(MB/s)

解壓縮速度(MB/s)

Brotli:1

3.381

98.3

334

Brotli:9

3.965

17

354.5

Brotli:11

4.347

0.5

289.5

Deflate:1

2.913

93.5

323

Deflate:9

3.371

15.5

347.3

Zopfli

3.58

0.2

342.1

Lzma:1

3.847

10.2

70

Lzma:9

4.24

3.9

71.7

Lzham:1

3.836

3.9

116

Lzham:9

3.952

0.5

117.7

Bzip2:1

3.757

11.8

40.4

Bzip2:9

3.869

12

40.2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A web content, 1285 files and 70611753 bytes

算法:級別

壓縮比

壓縮速度(MB/s)

解壓縮速度(MB/s)

Brotli:1

5.217

145.2

508.4

Brotli:9

6.253

30.1

508.7

Brotli:11

6.938

0.6

441.8

Deflate:1

4.666

146.9

434.8

Deflate:9

5.528

32.9

484.1

Zopfli

5.77

0.2

460.1

Lzma:1

5.825

7.9

100.5

Lzma:9

6.231

4.4

102.2

Lzham:1

5.58

4.7

168.7

Lzham:9

5.768

0.2

172.7

Bzip2:1

5.71

11

52.3

Bzip2:9

5.867

11.1

52.3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ebwik8 single file 100M

算法:級別

壓縮比

壓縮速度(MB/s)

解壓縮速度(MB/s)

Brotli:1

2.711

78.3

228.6

Brotli:9

3.308

5.6

279.4

Brotli:11

3.607

0.4

257.4

Deflate:1

2.364

70.8

211.7

Deflate:9

2.742

18.1

217.4

Zopfli

2.857

0.6

227.7

Lzma:1

3.106

9.8

60.6

Lzma:9

3.696

3.44

71.8

Lzham:1

3.335

2.4

177.9

Lzham:9

3.643

0.4

192.2

Bzip2:1

3.007

12.3

30.8

Bzip2:9

3.447

12.4

30.3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • 參考文獻:

1. https://zopfli.googlecode.com/files/Data_compression_using_Zopfli.pdf
2. https://github.com/google/brotli/releases/tag/v0.2.0
3. http://www.zlib.net/
4. https://github.com/google/zopfli/commit/89cf773beef75d7f4d6d378debdf299378c3314e
5. http://www.7­zip.org/history.txt
6. https://github.com/richgel999/lzham_codec/releases/tag/v1_0_stable1
7. http://www.bzip.org/
8. http://corpus.canterbury.ac.nz/
9. http://prize.hutter1.net/
10.https://cran.r-project.org/web/packages/brotli/vignettes/brotli-2015-09-22.pdf 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM