27gzip Module
27.1Overview
The gzip
module provides measures to read/write GZIP files. To utilize it, import the gzip
module using import
function.
Below is an example to read data from a GZIP file and write its uncompressed data to another file.
import(gzip)
gzip.reader('foo.dat.gz').copyto('foo.dat')
Below is an example to read data from a file and write its compressed data to a GZIP file.
import(gzip)
gzip.writer('foo.dat.gz').copyfrom('foo.dat')
27.2Module Function
gzip.reader(stream:stream:r) {block?}
gzip.writer(stream:stream:w, level?:number) {block?}
27.3Extension to stream Class
This module extends the stream
class with methods described here.
stream#reader@gzip() {block?}
stream#writer@gzip(level?:number) {block?}
27.4Thanks
This module uses zlib which official site is: