| Libraries |
|
LZIP | Source Code |
|
|
lzipFile
const type: lzipFile
-
File implementation type to decompress a Lzip file. Lzip is a file format used for compression.
| Function Summary | |||||
| string |
| ||||
| file |
| ||||
| void |
| ||||
| char |
| ||||
| string |
| ||||
| boolean |
| ||||
| boolean |
| ||||
| integer |
| ||||
| boolean |
| ||||
| void |
| ||||
| integer |
| ||||
| Function Detail |
lzipDecompress
const func string: lzipDecompress (inout file: compressed)
-
Decompress a file that was compressed with Lzip. Lzip is a file format used for compression. Lzip uses the LZMA compression algorithm. LZMA is the Lempel–Ziv–Markov chain algorithm. LZMA performs lossless data compression. In addition to LZMA, Lzip uses a magic number and a header.
- Returns:
- the uncompressed string.
- Raises:
- RANGE_ERROR - If compressed is not in Lzip format.
openLzipFile
const func file: openLzipFile (inout file: compressed, READ)
-
Open a Lzip file for reading (decompression). Lzip is a file format used for compression. Reading from the file delivers decompressed data. Writing is not supported. Lzip uses the LZMA compression algorithm. LZMA is the Lempel–Ziv–Markov chain algorithm. LZMA performs lossless data compression. In addition to LZMA, Lzip uses a magic number and a header.
- Returns:
- the file opened, or STD_NULL if the file is not in Lzip format.
getc
const func char: getc (inout lzipFile: inFile)
-
Read a character from a lzipFile.
- Returns:
- the character read.
gets
const func string: gets (inout lzipFile: inFile, in integer: maxLength)
-
Read a string with maximum length from a lzipFile.
- Returns:
- the string read.
- Raises:
- RANGE_ERROR - The parameter maxLength is negative.
eof
const func boolean: eof (in lzipFile: inFile)
-
Determine the end-of-file indicator. The end-of-file indicator is set if 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 lzipFile: 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 lzipFile: 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.
seekable
const boolean: seekable (in lzipFile: aFile)
-
Determine if the file aFile is seekable. If a file is seekable, the functions seek and tell can be used to set and obtain the current file position.
- Returns:
- TRUE, since a lzipFile is seekable.
seek
const proc: seek (inout lzipFile: 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.
- Raises:
- RANGE_ERROR - The file position is negative or zero.
tell
const func integer: tell (in lzipFile: 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.
|
|
|
