gzip

Since 1.5.0

Contains functions for working with gzip compression

Functions

gzip(inputFile, outputFile) — creates a gzip archive with the inputFile file and saves to outputFile.
Returns 1 if compression was successfull, -1 otherwise.

use gzip
gzip("/tmp/readme.md", "/tmp/readme.md.gz")

gzipBytes(bytes) — returns gzip-compressed input bytes.

use gzip
bytes = gzipBytes([0, 119, 87, 80/* ... */])

ungzip(inputFile, outputFile) — unpacks a gzip archive to outputFile file.
Returns 1 if operation was successfull, -1 otherwise.

use gzip
gzip("/tmp/readme.md.gz", "/tmp/readme.md")

ungzipBytes(bytes) — returns uncompressed bytes.

use gzip
bytes = ungzipBytes([0, 119, 87, 80/* ... */])