VB example Visual C++ example Delphi example
The Decompress method decompresses data entirely in memory. It works the same way as the compress method does, so it can decompress data in a single call, or it can be called multiple times to decompress data in a streaming fashion.
Parameter | Description |
---|---|
vaCompressed | The data to decompress. The variant can contain a string or a byte array. |
bEndOfData | This parameter indicates whether or not there is more data to decompress. If you only have a single block of data to decompress, set this parameter to True. The library will then immediately decompress all the data provided in the vaCompressed parameter and return the resulting uncompressed data. If you can (or want to) only provide a portion of the data to decompress in the vaCompressed parameter and will provide more data later in a subsequent call to the Decompress method, set this parameter to False. In this case, the library will decompress and return as much data as possible. When the final portion of the data to decompress has been provided, set the bEndOfData parameter to True. The method will then return the final portion of the decompressed data. |
The return value is a byte array variant containing the decompressed data.
The CompressionFormat property must be set in order for the library to determine how to decompress the data and to determine which type of checksum (if any) to use for integrity checking.
ToString and FromString
When calling the Compress method with the bEndOfData parameter specified as False, you cannot call any other Xceed Streaming Compression control method (of the same instance of the control) until you have completed processing a stream of data by calling the Compress method with the bEndOfData parameter specified as True.
With Visual Basic, it is often necessary to convert the resulting decompressed data from a byte array variant to a native VB byte array before saving it or transmitting it. VB6 makes it particularly easy to do the conversion: If you have a variant named (for example) DecompressedData, you can convert it to a native VB byte array with the following code:
Visual Basic | ![]() |
---|---|
|
With Microsoft Access, you can place the decompressed data in either a Memo field or an OLE Object field. Using an OLE Object field in a table is the easiest: You can directly assign your data to the field and conversion is automatic. To assign the decompressed data variant to a Memo field, use the "AppendChunk" function in Access.
Declaration (DXceedStreamingCompression) | ![]() |
---|---|
HRESULT Decompress |
Declaration (IXceedStreamingCompression) | ![]() |
---|---|
|