????zlib?????????????????????????y??м???????????????????????????
????1.???????
?????????zlib?????????http://www.zlib.net/
????????????make??ɡ?make????????????libz.a.
????2.???
????????zlib.h??libz.a??ɡ????????zlib.h?????????Щ??????
??????????????“http://www.cppblog.com/woaidongmao/archive/2009/09/07/95495.html”?????zlib.h???????
????????zlib.h?У???????????Σ?????????????????????????Щ???????.????????Щ??????????????????????????Щ???????????.
?????????????????????:
????(1)int compress (Bytef *dest??   uLongf *destLen?? const Bytef *source?? uLong sourceLen);
?????????????????????壬 ??????? ?????????
????(2) int compress2 (Bytef *dest??   uLongf *destLen??const Bytef *source?? uLong sourceLen??int level);
?????????????????????????????????????????????????????????????(0-9)???????????????????????????????????????????: ???????????????????
????(3) uLong compressBound (uLong sourceLen);
??????????????????????. ????????????????????????? sourcelen ????????????ж?? ??????????????????£?????????????????????????????????????????????????С????????????????
????(4) int uncompress (Bytef *dest??   uLongf *destLen??const Bytef *source?? uLong sourceLen);
?????????(???????????:)
????(5) deflateInit() + deflate() + deflateEnd()
????3????????????????????????????÷??? example.c ?? test_deflate()????. ??? compress() ?????????????3??????????(???? zlib ?? compress.c ???)
????(6) inflateInit() + inflate() + inflateEnd()
??????(5)????????????????.
????(7) gz????????.????????*.gz????????????stdio???÷??????. ??????????????example.c ?? test_gzio() ????????easy.
????(8) ?????????e汾??????????.
???????:?????????compress() ??uncompress() ?????????????????????????.