Top Documents Download Gallery Repository
Are you looking for a Software Engineer? Check Here

26gzip Module

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')

26.1Module Function

gzip.reader
gzip.reader(stream:stream:r) {block?}

gzip.writer
gzip.writer(stream:stream:w, level?:number) {block?}

26.2Extension to stream Class

This module extends the stream class with methods described here.

stream#reader@gzip
stream#reader@gzip() {block?}

stream#writer@gzip
stream#writer@gzip(level?:number) {block?}

26.3Thanks

This module uses zlib which official site is:

http://zlib.net/


Copyright (C) 2011-2017 ypsitau