fix review code

This commit is contained in:
Manjusaka 2024-11-26 19:48:29 +08:00
parent 5ffa30b5f0
commit abfb1d2014
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("<BBIxx", self.__read(8))
method, flag = struct.unpack("<BB4x", self.__read(8))
if method != 8:
raise CompressionError("unsupported compression method")