1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

test: raw deflate

This commit is contained in:
Witold Filipczyk 2008-02-28 19:17:50 +01:00 committed by Witold Filipczyk
parent 3c861fd530
commit c48dc625e3

View File

@ -1,9 +1,11 @@
#!/usr/bin/env python #!/usr/bin/env python
import os, time, zlib import os, time
from zlib import *
data1 = '<html><body>Two lines should be visible.<br/>The second line.</body></html>' data1 = '<html><body>Two lines should be visible.<br/>The second line.</body></html>'
cd1 = zlib.compress(data1) ob = compressobj(Z_DEFAULT_COMPRESSION, DEFLATED, -MAX_WBITS)
cd1 = ob.compress(data1)
cd1 += ob.flush()
length = len(cd1) length = len(cd1)
next_chunk = hex(length - 10)[2:] next_chunk = hex(length - 10)[2:]