Functions
GZip.gzdopen — Methodgzdopen(fd, [gzmode, buf_size])Create a GZipStream object from an integer file descriptor. See gzopen for gzmode and buf_size descriptions.
GZip.gzopen — Methodgzopen(fname::AbstractString, [gzmode::AbstractString, buf_size::Integer])::GZipStreamOpens a file with mode (default "r"), setting internal buffer size to buf_size (default Z_DEFAULT_BUFSIZE=8192), and returns a the file as a GZipStream.
gzmode must contain one of:
| mode | Description |
|---|---|
| r | read |
| w | write, create, truncate |
| a | write, create, append |
In addition, gzmode may also contain
| mode | Description |
|---|---|
| x | create the file exclusively (fails if file exists) |
| 0-9 | compression level |
and/or a compression strategy:
| mode | Description |
|---|---|
| f | filtered data |
| h | Huffman-only compression |
| R | run-length encoding |
| F | fixed code compression |
Note that + is not allowed in gzmode. If an error occurs, gzopen throws a GZError.
GZip.open — Methodopen(fname::AbstractString, [gzmode, bufsize])::GZipStreamAlias for gzopen. This is not exported, and must be called using GZip.open.
Types
GZip.GZError — TypeGZError <: Exceptiongzip error number and string. Possible error values:
| Error number | String |
|---|---|
Z_OK | No error |
Z_ERRNO | Filesystem error (consult errno()) |
Z_STREAM_ERROR | Inconsistent stream state |
Z_DATA_ERROR | Compressed data error |
Z_MEM_ERROR | Out of memory |
Z_BUF_ERROR | Input buffer full/output buffer empty |
Z_VERSION_ERROR | zlib library version is incompatible with caller version |
GZip.GZipStream — TypeGZipStream <: IO
GZipStream(name, gz_file, [buf_size])Subtype of IO which wraps a gzip stream. Returned by gzopen and gzdopen.