This sample demonstrates how to compress and decompress a chunk of memory data using different kinds of compression formats and methods while showing the size of the compressed data.
Project path: Samples\Visual Basic 6\MemoryCompress
Project file name: MemoryCompress.vbp
Properties: CompressionFormat
Methods: Compress and Decompress
Type the text to compress in the "Text to compress" text box. Select the compression formats from the combo box. This combo also includes compression methods; in that case, the compressed file will have no formatting. Click on the Compress button. The 'Compressed size' label shows you the size of the compressed data. Click on the Decompress button to Decompress the compressed data and display the result in the "Decompressed text" text box. The two text boxes should now be the same.