'Usage
Dim instance As Decompressor
Dim buffer() As Byte
Dim offset As Integer
Dim count As Integer
Dim endOfData As Boolean
Dim decompressed() As Byte
Dim remaining As Integer
Dim value As Integer
value = instance.Decompress(buffer, offset, count, endOfData, decompressed, remaining)
Parameters
buffer
An array of bytes to decompress. A maximum of count bytes are taken from this array and decompressed.
offset
The byte offset in buffer at which to begin taking the data to decompress.
count
The maximum number of bytes to be taken from buffer.
endOfData
true if the end of the compressed data has been reached; false otherwise.
decompressed
An array of bytes containing the decompressed data. Can be empty if no bytes were decompressed.
remaining
The number of unused bytes read from buffer the for decompression.
Return Value
The number of bytes written to the decompressed parameter.
Remarks
When the first call to Decompress is made, a decompression "session" is created. This session remains opened as long as Decompress is called with the parameter endOfData set to False.
During a decompression session, the decompression engine can choose to keep the data to decompress in an internal buffer and return an empty array after a call to Decompress. This could happen if not enough compressed data has yet been provided to determine the decompressed result.
When Decompress is called with the parameter endOfData set to True, the decompression session is closed and all of the remaining decompressed data is returned. The next call to Decompress will create a new decompression session.
The decompressed array may have a Length greater than the number of bytes returned by the call to Decompress.
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2