CompressData
From Solid Graphics Wiki
| ||||||||||||
The CompressData compresses chunk of binary data in memory.
bool CompressData
(
const void* srcBuffer,
unsigned int srcBufferSize,
void* dstBuffer,
unsigned int* dstBufferSize
);
Parameters
| srcBuffer | Pointer to data to compress. |
| srcBufferSize | Amount of the data from the srcBuffer to compress in bytes. |
| dstBuffer | After the CompressData function returns the memory bufefr pointed by dstBuffer will contain the compressed data. |
| dstBufferSize | Before calling the CompressData function the variable pointed by dstBufferSize must be set to size/capacity of the dstBuffer in bytes. The variable must be set to at least srcBufferSize value plus 256. After the function returns the variable pointed by dstBufferSize will be set to number of bytes written into the dstBuffer. |
Return Value
The function returns true in case of success, in case of error it returns false and the content of variables pointed by dstBuffer and dstBufferSize is undefined.
See Also
