![]() Test for deflate: > compress(deflate_data) Obvious test for zlib: > compress(zlib_data) > gzip_data = gzip_press(text) + gzip_compress.flush() > zlib_data = zlib_press(text) + zlib_compress.flush() > deflate_data = deflate_press(text) + deflate_compress.flush() > gzip_compress = pressobj(9, zlib.DEFLATED, zlib.MAX_WBITS | 16) > zlib_compress = pressobj(9, zlib.DEFLATED, zlib.MAX_WBITS) Test data: > deflate_compress = pressobj(9, zlib.DEFLATED, -zlib.MAX_WBITS) See documentation in (section inflateInit2) examples to (de-)compress gzip format, use wbits = zlib.MAX_WBITS | 16.to (de-)compress zlib format, use wbits = zlib.MAX_WBITS.to (de-)compress deflate format, use wbits = -zlib.MAX_WBITS.choosing windowBitsīut zlib can decompress all those formats: your data follows RFC 1951 ( deflate compressed format) rather than RFC 1950 ( zlib compressed format) or RFC 1952 ( gzip compressed format). Which is most likely because you are trying to check headers that are not there, e.g. You have this error: zlib.error: Error -3 while decompressing: incorrect header check ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |