DECOMPRESS (decompress data from source buffer)

Top  Previous  Next

 

DECOMPRESS (*STRING destBuf, *STRING srcBuf, <*SIGNED result>)

 

If decompression is successful the result parameter is set to the number

of bytes written to the destination buffer. If an error occurs then the result is set to

a negative error code.

 

Decompresses data from the source buffer to the destination buffer.

is successful, Compress allocates an output buffer, and returns it. The program is

responsible for disposing this buffer after usage. 
  

destBuf

Buffer to write the decompressed data

srcBuf

Buffer containing the data to decompress

result

If decompression is successful, the result is set to the number of bytes written to the destination buffer. If there is an error the variable is set to a negative error code

 

Errors Posted:

-2

stream error

-3

Compressed data is corrupt

-4

Insufficient memory

-5

Destination buffer (for Decompress), or temporary buffer (for Compress) has insufficient size

Example:

DECOMPRESS(DestinationBuffer,CompressedData,result)

 

 

See Also:

Compress