cResult bUnZip2(<cData>) cResult bZip2(<cData> [,<nLevel>]) lRet bZip2Close(<nHandle>) nHandle bZip2Open(<filename> [,<mode>]) realLen bZip2Read(<nHandle>, <@cBuffer> [,<nLen>]) realLen bZip2Write(<nHandle>, <cBuffer> [,<nLen>]) cResult gUnZip(<cData>) cResult gZip(<cData> [,<nLevel>]) lRet gZipClose(<nHandle>) nHandle gZipOpen(<filename> [,<mode>]) realLen gZipRead(<nHandle>, <@cBuffer> [,<nLen>]) realLen gZipWrite(<nHandle>, <cBuffer> [,<nLen>])
Category Pack/Unpack include description of functions for pack/unpack and compress/uncompress data or file.
Library clip-gzip is wrapper to populiar gzip library, for using clip-gzip need linking: clip -e test.prg -lclip-gzip
Library clip-bzip2 is wrapper to populiar bzip2 library, for using clip-bzip2 need linking: clip -e test.prg -lclip-bzip2
bUnZip2(<cData>) --> cResult
Unompress string, compressed by bZip2().
<cData> | - data for uncompress. |
Returns : | bUnZip2() returns uncompressed string. |
See also : | bZip2() |
bZip2(<cData> [,<nLevel>]) --> cResult
Compress string with given compression level (default 6).
<cData> | - data for compress. |
<nLevel> | - level of compress. |
Returns : | bZip2() returns compressed string. |
See also : | bUnZip2() |
bZip2Close(<nHandle>) --> lRet
bZip2Close() must be called explicitly, to clear and sync all buffers.
<nHandle> | - number of opened file. |
Returns : | bZip2Close() returns .t. or .f. as information about error. |
See also : | bZip2Open() bZip2Read() bZip2Write() |
bZip2Open(<filename> [,<mode>]) --> nHandle
Open bZIP2 file with name <filename> and mode <mode> , by default for reading. Possible modes: "rb" - binary read (no cr/lf translation) "wbX" - set compression level X in range 0 to 9
<filename> | - name of file with bZIP2 archive. |
<mode> | - file open mode. |
Returns : | bZip2Open() returns number of opened file or -1 if error. |
See also : | bZip2Read() bZip2Write() bZip2Close() |
bZip2Read(<nHandle>, <@cBuffer> [,<nLen>]) --> realLen
Read and unpack data from opened bZIP2 file with <nHandle> into preallocated <cBuffer> <nLen> bytes.
<nHandle> | - number of opened file. |
<cBuffer> | - buffer for read data. |
<nLen> | - number of read bytes. |
Returns : | bZip2Read() returns number of readed bytes or -1 if error. |
See also : | bZip2Open() bZip2Write() bZip2Close() |
bZip2Write(<nHandle>, <cBuffer> [,<nLen>]) --> realLen
Pack <len> bytes from <cBuffer> and write them to bZIP2-file.
<nHandle> | - number of opened file. |
<cBuffer> | - buffer with data. |
<nLen> | - number of write bytes. |
Returns : | bZip2Write() returns number of writed bytes or -1 if error. |
See also : | bZip2Open() bZip2Read() bZip2Close() |
gUnZip(<cData>) --> cResult
Unompress string, compressed by gZip().
<cData> | - data for uncompress. |
Returns : | gUnZip() returns uncompressed string. |
See also : | gZip() |
gZip(<cData> [,<nLevel>]) --> cResult
Compress string with given compression level (default 6).
<cData> | - data for compress. |
<nLevel> | - level of compress. |
Returns : | gZip() returns compressed string. |
See also : | gUnZip() |
gZipClose(<nHandle>) --> lRet
gZipClose() must be called explicitly, to clear and sync all buffers.
<nHandle> | - number of opened file. |
Returns : | gZipClose() returns .t. or .f. as information about error. |
See also : | gZipOpen() gZipRead() gZipWrite() |
gZipOpen(<filename> [,<mode>]) --> nHandle
Open GZIP file with name <filename> and mode <mode> , by default for reading. Possible modes: "rb" - binary read (no cr/lf translation) "wbX" - set compression level X in range 0 to 9
<filename> | - name of file with gzip archive. |
<mode> | - file open mode. |
Returns : | gZipOpen() returns number of opened file or -1 if error. |
See also : | gZipRead() gZipWrite() gZipClose() |
gZipRead(<nHandle>, <@cBuffer> [,<nLen>]) --> realLen
Read and unpack data from opened GZIP file with <nHandle> into preallocated <cBuffer> <nLen> bytes.
<nHandle> | - number of opened file. |
<cBuffer> | - buffer for read data. |
<nLen> | - number of read bytes. |
Returns : | gZipRead() returns number of readed bytes or -1 if error. |
See also : | gZipOpen() gZipWrite() gZipClose() |
gZipWrite(<nHandle>, <cBuffer> [,<nLen>]) --> realLen
Pack <len> bytes from <cBuffer> and write them to GZIP-file.
<nHandle> | - number of opened file. |
<cBuffer> | - buffer with data. |
<nLen> | - number of write bytes. |
Returns : | gZipWrite() returns number of writed bytes or -1 if error. |
See also : | gZipOpen() gZipRead() gZipClose() |