![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
General purpose compression and decompression utility.
The methods use zlib to perform compression and decompression.
Static Public Member Functions | |
static TSLCompressionResult | compress (const unsigned char *uncompressedData, const TSLFileLength uncompressedDataLength, unsigned char **compressedData, TSLFileLength *compressedDataLength) |
static TSLCompressionResult | compressFile (const char *filename) |
static TSLCompressionResult | decompress (const unsigned char *compressedData, const TSLFileLength compressedDataLength, unsigned char **uncompressedData, TSLFileLength *uncompressedDataLength) |
static TSLCompressionResult | decompressFile (const char *filename) |
static void | freeBufferData (unsigned char *data) |
|
static |
Compress data.
The data created includes the tag and the uncompressed length ready to save to file.
New data is allocated which must be deleted by the caller.
Parameters:
uncompressedData: Uncompressed data in memory provided to the routine.
uncompressedDataLength: Length of data in the uncompressedData buffer.
compressedData: Pass a pointer to the routine, which on return will point to compressed data allocated by the routine. The user must delete the data when no longer required, by calling freeBufferData.
compressedDataLength: Pass the address of a variable to the routine, which on return will contain the length of the compressed data in the compressedData buffer.
|
static |
Compress a file on the local hard drive or network drive (not remotely).
Parameters:
filename: fully qualified filename to compress.
|
static |
Decompress data.
The data must include the tag and the uncompressed length as saved to file.
New data is allocated which must be deleted by the caller.
Parameters:
compressedData: Compressed data in memory provided to the routine.
compressedDataLength: Length of data in the compressedData buffer.
uncompressedData: Pass a pointer to the routine, which on return will point to decompressed data allocated by the routine. The user must delete the data when no longer required, by calling freeBufferData.
uncompressedDataLength: Pass the address of a variable to the routine, which on return will contain the length of the uncompressed data in the uncompressedData buffer.
|
static |
Decompress a file on the local hard drive or network drive (not remotely).
Parameters:
filename: fully qualified filename to decompress.
|
static |
Call this routine to free the data allocated by the compress or decompress routines.