DAZ Script *.gz (gzip) file I/O class.
|Boolean||open ( AccessMode accessMode )|
|Boolean||unzip ( String filename )|
|void||write ( String data, Number length=-1 )|
|void||writeByte ( Number byte )|
|void||writeLine ( String data )|
|Boolean||zip ( String filename )|
This class provides DAZ Script functionality for reading and writing *.gz ('gzipped') files. A high-level interface for zipping/unzipping files is provided with the functions zip() and unzip(). Also, a low-level interface is provided, allowing scripts to read and write compressed files directly.
Enumerated values used with open() to describe the mode in which a file is opened.
'. When writing, the end-of-line terminators are translated to the local encoding.
Creates a gzip file with the given file name.
void : close()
Closes the file.
trueif the current file position is at the end of the file, otherwise
Boolean : open( AccessMode accessMode )
Open the file with the given mode.
trueif the file was opened successfully, otherwise
Reads the entire file.
Read one uncompressed character from the file buffer.
Read a line of text from the file.
Read an uncompressed line of text from the file.
Uncompresses the entire file and splits it into lines of text.
Boolean : unzip( String filename )
Unzips this file into the given filename.
true if the file was successfully unzipped, otherwise
void : write( String data, Number length=-1 )
Write a string to the file compression buffer.
void : writeByte( Number byte )
Write a single byte (character) to the file compression buffer.
void : writeLine( String data )
Write a line of text to the file compression buffer.
Boolean : zip( String filename )
Replaces this file's contents with the gzipped contents of the given file. If this file does not exist, it will be created.
trueif the file was successfully zipped, otherwise