How to create a gzip file w/ FEXTRA & FCOMMENT fields
问题 I have a need to test if a program that I'm writing is parsing the gzip header correctly, and that includes reading the FEXTRA, FNAME, and FCOMMENT fields. Yet it seems that gzip doesn't support creating archives with the FEXTRA and FCOMMENT fields -- only FNAME. Are there any existing tools which can do all three of these? 回答1: The Perl module IO::Compress::Gzip optionally lets you set the three fields you are intrested in. ( Fair disclosure : I am the author of the module) Here is some