Closed bguise987 closed 4 years ago
This bit of code from the gzip module seems relevant:
try:
# RFC 1952 requires the FNAME field to be Latin-1. Do not
# include filenames that cannot be represented that way.
fname = os.path.basename(self.name)
if not isinstance(fname, bytes):
fname = fname.encode('latin-1')
if fname.endswith(b'.gz'):
fname = fname[:-3]
except UnicodeEncodeError:
fname = b''
flags = 0
if fname:
flags = FNAME
Gzip and pigz both add FNAME to the header (FLG bit 3)
See http://www.zlib.org/rfc-gzip.html#header-trailer