Xceed Real-Time Zip for .NET Documentation
Decompress Method (Decompressor)


Xceed.Compression Assembly > Xceed.Compression Namespace > Decompressor Class : Decompress Method
An array of bytes to decompress. A maximum of count bytes are taken from this array and decompressed.
The byte offset in buffer at which to begin taking the data to decompress.
The maximum number of bytes to be taken from buffer.
true if the end of the compressed data has been reached; false otherwise.
An array of bytes containing the decompressed data. Can be empty if no bytes were decompressed.
The number of unused bytes read from buffer the for decompression.
Decompresses an array of bytes.
Syntax
'Declaration
 
Public MustOverride Function Decompress( _

   ByVal buffer() As Byte, _

   ByVal offset As Integer, _

   ByVal count As Integer, _

   ByRef endOfData As Boolean, _

   ByRef decompressed() As Byte, _

   ByRef remaining As Integer _

) As Integer
'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)
public abstract int Decompress( 

   byte[] buffer,

   int offset,

   int count,

   ref bool endOfData,

   out byte[] decompressed,

   out int 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

See Also

Reference

Decompressor Class
Decompressor Members