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() | Uncompress string with BZIP2 alghoritm. |
BZIP2() | Compress string with bZIP2 alghoritm. |
BZIP2CLOSE() | Close bZIP2 file. |
BZIP2OPEN() | Open bZip2 file. |
BZIP2READ() | Read data from bZIP2 file. |
BZIP2WRITE() | Write data to bZIP2 file. |
GUNZIP() | Uncompress string with GZIP alghoritm. |
GZIP() | Compress string with GZIP alghoritm. |
GZIPCLOSE() | Close GZIP file. |
GZIPOPEN() | Open GZIP file. |
GZIPREAD() | Read data from GZIP file. |
GZIPWRITE() | Write data to GZIP file. |
cResult := bUnZip2(<cData>)
bUnZip2() returns uncompressed string.
Unompress string, compressed by bZip2().
cResult := bUnZip2(bZip2(space(1000)))
ITK,Paul
No dependies of platform.
cResult := bZip2(<cData> [,<nLevel>])
bZip2() returns compressed string.
Compress string with given compression level (default 6).
cResult := bZip2(space(1000))
ITK,Paul
No dependies of platform.
lRet := bZip2Close(<nHandle>)
bZip2Close() returns .t. or .f. as information about error.
bZip2Close() must be called explicitly, to clear and sync all buffers.
lRet := bZip2Close(h)
ITK,Paul
No dependies of platform.
nHandle := bZip2Open(<filename> [,<mode>])
bZip2Open() returns number of opened file or -1 if error.
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
h := bZip2Open("a.gz","rb")
ITK,Paul
No dependies of platform.
realLen := bZip2Read(<nHandle>, <@cBuffer> [,<nLen>])
bZip2Read() returns number of readed bytes or -1 if error.
Read and unpack data from opened bZIP2 file with <nHandle> into preallocated <cBuffer> <nLen> bytes.
s := space(1000) realLen := bZip2Read(h,@s,300)
ITK,Paul
No dependies of platform.
realLen := bZip2Write(<nHandle>, <cBuffer> [,<nLen>])
bZip2Write() returns number of writed bytes or -1 if error.
Pack <len> bytes from <cBuffer> and write them to bZIP2-file.
s := space(1000) realLen := bZip2Write(h,s,300)
ITK,Paul
No dependies of platform.
cResult := gUnZip(<cData>)
gUnZip() returns uncompressed string.
Unompress string, compressed by gZip().
cResult := gUnZip(gZip(space(1000)))
ITK,Paul
No dependies of platform.
cResult := gZip(<cData> [,<nLevel>])
gZip() returns compressed string.
Compress string with given compression level (default 6).
cResult := gZip(space(1000))
ITK,Paul
No dependies of platform.
lRet := gZipClose(<nHandle>)
gZipClose() returns .t. or .f. as information about error.
gZipClose() must be called explicitly, to clear and sync all buffers.
lRet := gzipClose(h)
ITK,Paul
No dependies of platform.
nHandle := gZipOpen(<filename> [,<mode>])
gZipOpen() returns number of opened file or -1 if error.
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
h := gZipOpen("a.gz","rb")
ITK,Paul
No dependies of platform.
realLen := gZipRead(<nHandle>, <@cBuffer> [,<nLen>])
gZipRead() returns number of readed bytes or -1 if error.
Read and unpack data from opened GZIP file with <nHandle> into preallocated <cBuffer> <nLen> bytes.
s := space(1000) realLen := gzipRead(h,@s,300)
ITK,Paul
No dependies of platform.
realLen := gZipWrite(<nHandle>, <cBuffer> [,<nLen>])
gZipWrite() returns number of writed bytes or -1 if error.
Pack <len> bytes from <cBuffer> and write them to GZIP-file.
s := space(1000) realLen := gzipWrite(h,s,300)
ITK,Paul
No dependies of platform.