Opens a gzip (.gz) file for reading or writing. In contrast to xzopen xzopen2 allowes setting of some gzip-header-elements:
comment: Commentstring (may be empty)
origname: Original filename (may be empty)
filetime: Orig. date/time of file (seconds since 1970, may be 0)
xf_len: No. of Bytes to reserve in extra-field (may be 0)
xfield: extra-field-data (may be empty)
xzopen2 returns a NULL fileHandle and 0 as Result if the file could not be opened or if there was insufficient memory to allocate the (de)compression state.
path Full pathname of file to open/create. |
mode Combine following into one mode-string: Readmode: "r","r+","rb" or "r+b" r=read b=binary (also text with CR and/or LF) +=allows writing too (setting extrafield) Writemode: "w","w+", "wb" or "w+b" w=write b=binary (also text with CR and/or LF) +=allows reading too (to read header-fields) Compressionlevel (in Writemode only): "0" = no compression, "1".."9" for higher but slower compression Strategy (in Writemode only): "f" for filtered data "h" for Huffmann only compression |
filetime Original date/time of file in packed format. Seconds since 1.1.1970. |
xf_len If xfield is empty, xf_len sets the reserved size for the extra-field in the gz-header (filled with zeroes). If xfield is NOT empty xf_len is ignored and xfield is copiied to the extra-field. |
xfield If xfield is empty, xf_len sets the reserved size for the extra-field in the gz-header (filled with zeroes). If xfield is NOT empty xf_len is ignored and xfield is copiied to the extra-field. |
origname Original path and filename. |
comment The comment string. |
fileHandle |
Result |