You can find the Memory Compression Sample Application for C++ Builder 4 and up in:
SAMPLES\C++ BUILDER 4-5\MEMORYCOMPRESSION
SAMPLES\C++ BUILDER 6\MEMORYCOMPRESSION
This sample application provides you with an example that compresses and decompresses files using byte arrays, and the Compress and Uncompress methods.
To use the sample, load the MEMORYCOMPRESSION.BPR project file, then build and run the program.