- zlib gzip data ?-level level? ?-header dict?
This command, part of zlib, takes the bytearray data and returns its gzip-format compressed version. The -level option gives the compression level, which may be any value from 0 (uncompressed) to 9 (maximally, most slowly compressed). The -header option gives a dict that describes how to set up the gzip header. The following keys are used:
- comment
- A comment string. Will be encoded as an ISO 8859-1 string.
- crc
- Whether to calculate a CRC of the header. Note that the gzip utility program does not handle header CRCs.
- filename
- The name of the original file. Will be encoded as an ISO 8859-1 string.
- os
- The integer operating system code. The value should be one of those described in RFC 1952.
- time
- The mtime of the originating file.
- type
- The (guessed) type of the file, either text or binary.