src/dynpmc/gziphandle.pmc - GzipHandle PMC


The GzipHandle PMC performs I/O operations on a source or destination file.

This PMC wraps the zlib.

Vtable Functions

void init()
Initializes a newly created GzipHandle object.
INTVAL get_bool()
Returns whether the GzipHandle has reached the end of the file.

Stream-Oriented Methods

METHOD open(STRING *filename, STRING *mode :optional)
Opens the file at the given filename (including path) with the given mode. The invocant is modified and becomes an open filehandle.
METHOD close()
Close the gziphandle.
METHOD eof()
Returns true if the gziphandle is at end-of-file, returns false otherwise.
METHOD flush()
Flushes the gziphandle.
Print the passed in integer, number, string, or PMC to the gziphandle. (Integers, numbers, and strings are auto-boxed as PMCs.)
METHOD puts(STRING *value)
Print the string to the gziphandle.
METHOD read(INTVAL bytes)
Read the given number of bytes from the gziphandle and return them in a string.

Basic Methods

METHOD version()
Returns a string with the zlib version.