Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bitmapfont Bitset Bitsetof Boolean Bstring Bytedata Cards Category CC config Cgi Char Charsets Cipher Clib_file Color Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Idxarray Image Inflate Inifile Integer Keybd Line Listener Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont Window Wrinum X.509 Xmldom Xml_ent
Libraries
Gzip Source Code
 previous   up   next 

Function Summary
string
gunzip (in string: compressed)
Decompress a string that was compressed with gzip.
file
openGunzipFile (in string: compressed)
Open a gunzipFile to decompress a compressed string.
void
close (in gunzipFile: aFile)
Close a gunzipFile.
char
getc (inout gunzipFile: inFile)
Read a character from a gunzipFile.
string
gets (inout gunzipFile: inFile, in var integer: leng)
Read a string with maximum length from a gunzipFile.
boolean
eof (in gunzipFile: inFile)
Determine the end-of-file indicator.
boolean
hasNext (inout gunzipFile: inFile)
Determine if at least one character can be read successfully.
integer
length (inout gunzipFile: aFile)
Obtain the length of a file.
void
seek (inout gunzipFile: aFile, in integer: position)
Set the current file position.
integer
tell (in gunzipFile: aFile)
Obtain the current file position.
file
gunzip (inout file: aFile)
Open a gunzipFile to decompress a compressed file.
string
gzip (in string: uncompressed)
Compress a string to the gzip format.
file
openGzipFile (inout file: destFile)
Open a gzipFile to compress data to the gzip format.
void
close (inout gzipFile: aFile)
Close a gzipFile.
void
write (inout gzipFile: outFile, in string: stri)
Write the string stri to a gzipFile.

Function Detail

gunzip

const func string: gunzip (in string: compressed)

Decompress a string that was compressed with gzip. Gzip uses the DEFLATE compression algorithm. DEFLATE uses a combination of the LZ77 algorithm and Huffman coding. Additionally to DEFLATE gzip uses a magic number and a header.

Returns:
the uncompressed string.
Raises:
RANGE_ERROR - When compressed is not in gzip format.

openGunzipFile

const func file: openGunzipFile (in string: compressed)

Open a gunzipFile to decompress a compressed string.

Returns:
the file opened.

close

const proc: close (in gunzipFile: aFile)

Close a gunzipFile.


getc

const func char: getc (inout gunzipFile: inFile)

Read a character from a gunzipFile.

Returns:
the character read.

gets

const func string: gets (inout gunzipFile: inFile, in var integer: leng)

Read a string with maximum length from a gunzipFile.

Returns:
the string read.

eof

const func boolean: eof (in gunzipFile: inFile)

Determine the end-of-file indicator. The end-of-file indicator is set when at least one request to read from the file failed.

Returns:
TRUE if the end-of-file indicator is set, FALSE otherwise.

hasNext

const func boolean: hasNext (inout gunzipFile: inFile)

Determine if at least one character can be read successfully. This function allows a file to be handled like an iterator.

Returns:
FALSE if getc would return EOF, TRUE otherwise.

length

const func integer: length (inout gunzipFile: aFile)

Obtain the length of a file. The file length is measured in bytes.

Returns:
the length of a file, or 0 if it cannot be obtained.

seek

const proc: seek (inout gunzipFile: aFile, in integer: position)

Set the current file position. The file position is measured in bytes from the start of the file. The first byte in the file has the position 1.


tell

const func integer: tell (in gunzipFile: aFile)

Obtain the current file position. The file position is measured in bytes from the start of the file. The first byte in the file has the position 1.

Returns:
the current file position.

gunzip

const func file: gunzip (inout file: aFile)

Open a gunzipFile to decompress a compressed file. The file is read into a string and openGunzipFile is used to open a gunzipFile.

Returns:
the file opened.

gzip

const func string: gzip (in string: uncompressed)

Compress a string to the gzip format. Gzip uses the DEFLATE compression algorithm. DEFLATE uses a combination of the LZ77 algorithm and Huffman coding. Additionally to DEFLATE gzip uses a magic number and a header.

Returns:
the uncompressed string.
Raises:
RANGE_ERROR - When compressed is not in gzip format.

openGzipFile

const func file: openGzipFile (inout file: destFile)

Open a gzipFile to compress data to the gzip format. A gzipFile compresses data that is written to it. The compressed data is written to destFile in the gzip format. Gzip uses the DEFLATE compression algorithm. DEFLATE uses a combination of the LZ77 algorithm and Huffman coding. Additionally to DEFLATE gzip uses a magic number and a header.

Returns:
the file opened.

close

const proc: close (inout gzipFile: aFile)

Close a gzipFile.


write

const proc: write (inout gzipFile: outFile, in string: stri)

Write the string stri to a gzipFile.



 previous   up   next