We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a49a96b commit 8a57cacCopy full SHA for 8a57cac
2 files changed
tests/extmod/uzlib_decompio_gz.py
@@ -20,6 +20,16 @@
20
print(inp.read())
21
print(buf.seek(0, 1))
22
23
+# Check FHCRC field
24
+buf = io.BytesIO(b'\x1f\x8b\x08\x02\x99\x0c\xe5W\x00\x03\x00\x00\xcbH\xcd\xc9\xc9\x07\x00\x86\xa6\x106\x05\x00\x00\x00')
25
+inp = zlib.DecompIO(buf, 16 + 8)
26
+print(inp.read())
27
+
28
+# Check FEXTRA field
29
+buf = io.BytesIO(b'\x1f\x8b\x08\x04\x99\x0c\xe5W\x00\x03\x01\x00X\xcbH\xcd\xc9\xc9\x07\x00\x86\xa6\x106\x05\x00\x00\x00')
30
31
32
33
# broken header
34
buf = io.BytesIO(b'\x1f\x8c\x08\x08\x99\x0c\xe5W\x00\x03hello\x00\xcbH\xcd\xc9\xc9\x07\x00\x86\xa6\x106\x05\x00\x00\x00')
35
try:
tests/extmod/uzlib_decompio_gz.py.exp
@@ -7,5 +7,7 @@ b'lo'
7
b''
8
9
10
+b'hello'
11
12
ValueError
13
OSError(22,)
0 commit comments