- http://www.zlib.net/
- http://www.zlib.net/zlib_tech.html Technical Details
- http://oku.edu.mie-u.ac.jp/~okumura/compression/zlib.html zlib 入門
- http://dencha.ojaru.jp/programs/pg_filer_04_extra_03.html zlib1.2.2 FAQ 訳
- http://www.futomi.com/lecture/japanese/rfc1950.html RFC 1950 ZLIB Compressed Data Format Specification version 3.3 日本語訳
- Deflate (圧縮アルゴリズム)
実装比較†
- A comparison of Zlib implementations
- Improving zlib-cloudflare and comparing performance with other zlib forks
compress / uncompress†
compress†
compsize = ~; // 圧縮後のサイズより大きな値 compbuff = malloc(compsize); int result = compress(compbuff, &compsize, origbuff, origsize); if (result != Z_OK) { if (result == Z_MEM_ERROR) { fprintf(stderr, "compress: Z_MEM_ERROR: can't malloc\n"); } else if (result == Z_BUF_ERROR) { fprintf(stderr, "compress: Z_BUF_ERROR: not enough buff size\n"); } return 1; // FAILURE }
uncompress†
origsize = ~; // 伸張後のサイズより大きな値 origbuff = malloc(origsize); int result = uncompress(origbuff, &origsize, compbuff, compsize); if (result != Z_OK) { if (result == Z_MEM_ERROR) { fprintf(stderr, "uncompress: Z_MEM_ERROR: can't malloc\n"); } else if (result == Z_BUF_ERROR) { fprintf(stderr, "uncompress: Z_BUF_ERROR: not enough buff size\n"); } return 1; // FAILURE }
inflate / defrate†
(予定)
発表スライド†
未圧縮形式と固定ハフマン
参考†
- http://tools.ietf.org/rfc/rfc1950.pdf
- http://tools.ietf.org/rfc/rfc1951.pdf
- http://tools.ietf.org/rfc/rfc1952.pdf
- PNG Deflate/Inflate 圧縮
- Zlib Flush Modes
- https://www.bolet.org/~pornin/deflate-flush.html
- カスタムハフマン (dynamic huffman)
- Zlib (Deflate のコンテナ)
- Deflate (圧縮の仕様
- IO_Zlib 1.0.0 リリース (ハマりどころメモ)
- SWFバイナリ編集のススメ番外編 (zlib 伸張)
関連†
- LZFSE (Apple の圧縮技術)