Dmi Baranov added the comment:

I'll be glad to do it, but having some questions for discussing.

First about FEXTRA format - it consists of a series of subfields [1] and 
current Lib/test/test_gzip.py :: test_read_with_extra having a bit incorrect 
extra field - sure, if somebody using format from RFC1952. You having a real 
samples with extra field?.
Should we parse subfields here (I have already asked Jean-Loup Gailly, 
maintainer of registry of subfield IDs, for current registry values and waiting 
reply) or will just provide extra header as byte string?

Next about GzipFile's public interface - GzipFile(...).extra look ugly. Should 
I extend this ticket to support all metadata headers? FNAME, FCOMMENT, FHCRC, 
etc - correctly reading now, but no ways to get it outside (and no ways to 
create a file with FCOMMENT and FHCRC now).

Eg, something to like this:
GzipFile(...).metadata.FNAME == 'sample.gz'
GzipFile(..., extra=b'AP6Test', comment='comment')


[1] http://tools.ietf.org/html/rfc1952#section-2.3.1.1

----------
nosy: +dmi.baranov

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17681>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to