fix review code

This commit is contained in:
Manjusaka 2024-11-26 19:49:13 +08:00
parent abfb1d2014
commit 6c3a8a09de
No known key found for this signature in database
GPG key ID: 878F445D9C6CE65E

View file

@ -480,7 +480,7 @@ class _Stream:
# taken from gzip.GzipFile with some alterations
if self.__read(2) != b"\037\213":
raise ReadError("not a gzip file")
method, flag = struct.unpack("<BB4x", self.__read(8))
method, flag = struct.unpack("<BB6x", self.__read(8))
if method != 8:
raise CompressionError("unsupported compression method")