C++ String Compression: PPMD, Deflate, BZip2, LZW

This C++ example demonstrates string compression using four different compression algorithms: PPMD, Deflate, BZip2, and LZW. void TestCompression(const char *algorithm) { CkCompression comp; comp.put_Algorithm(algorithm); printf (“algorithm: %s\n”,algorithm); CkByteData compressedData; comp.CompressString(“abc abc abc abc abc abc abc abc abc abc abc 123 123 abc 123”,compressedData); // Get the compressed data: const unsigned char *pCompressedData = compressedData.getBytes(); unsigned long numBytes = compressedData.getSize(); […]