We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed4ce19 commit a6fc90fCopy full SHA for a6fc90f
tests/extmod/uzlib_decompress.py
@@ -18,11 +18,17 @@
18
19
20
# Raw DEFLATE bitstream
21
-v = b'\xcbH\xcd\xc9\xc9\x07\x00\x86\xa6\x106\x05\x00\x00\x00'
+v = b'\xcbH\xcd\xc9\xc9\x07\x00'
22
exp = b"hello"
23
out = zlib.decompress(v, -15)
24
assert(out == exp)
25
print(exp)
26
+# Even when you ask CPython zlib.compress to produce Raw DEFLATE stream,
27
+# it returns it with adler2 and oriignal size appended, as if it was a
28
+# zlib stream. Make sure there're no random issues decompressing such.
29
+v = b'\xcbH\xcd\xc9\xc9\x07\x00\x86\xa6\x106\x05\x00\x00\x00'
30
+out = zlib.decompress(v, -15)
31
+assert(out == exp)
32
33
# this should error
34
try:
0 commit comments