diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 7db3a40c9b3..273ca3c1c50 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -489,25 +489,27 @@ class _Stream: # taken from gzip.GzipFile with some alterations if self.__read(2) != b"\037\213": raise ReadError("not a gzip file") - if self.__read(1) != b"\010": + method, flag = struct.unpack("