VB example VB streaming example Visual C++ example Delphi example C# example VB.NET example
In the descriptions below, you can freely replace the word "compress" with "decompress" in order to find out how to decompress data, because compressing and decompressing works exactly the same way.
To compress data from a file directly into memory, perform the following 4 steps. Put the Streaming Compression control on a form or instantiate it, then:
Specify the format for the resulting compressed data. To do this, set the CompressionFormat property.
Tell the library to compress. To do this, call the ReadFile method, passing the source filename, a destination memory buffer and specifying True for the bEndOfData parameter.
Obtain the compressed data. To do this, assign the return value of the ReadFile method to the variable of your choice.
Make sure that everything worked properly. To do this, use your language's error handling object or error handling capabilities. The Xceed Streaming Compression Library supports standard COM error handling functionality.
To compress data from a file directly into memory, in portions instead of the complete file, perform the following 8 steps. Put the Xceed Streaming Compression control on a form or instantiate it, then:
Specire that everything worked properly. To do this, use your language's error handling object or error handling capabilities. The Xceed Streaming Compression Library supports standard COM error handling functionality.