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:
parent
3c861fd530
commit
c48dc625e3
@ -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:]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user