DotNetCompression Class Reference for Windows Phone
Decode Method (ICompressionDecoder)






The input buffer from which to read the bytes to decompress.
The offset in the input buffer at which to start reading the bytes to decompress.
The number of bytes to read from the input buffer.
The output buffer into which to write the decompressed bytes.
The offset in the output buffer at which to start writing the decompressed bytes.
The maximum number of decompressed bytes to write into the output buffer.
Returns the number of bytes read from the input buffer.
Reads compressed bytes from the specified input buffer and writes decompressed bytes into the specified output buffer.
Syntax
'Declaration
 
Function Decode( _
   ByVal input() As System.Byte, _
   ByVal inputOffset As System.Integer, _
   ByVal inputCount As System.Integer, _
   ByVal output() As System.Byte, _
   ByVal outputOffset As System.Integer, _
   ByVal maxOutputCount As System.Integer, _
   ByRef inputUsed As System.Integer _
) As System.Integer
'Usage
 
Dim instance As ICompressionDecoder
Dim input() As System.Byte
Dim inputOffset As System.Integer
Dim inputCount As System.Integer
Dim output() As System.Byte
Dim outputOffset As System.Integer
Dim maxOutputCount As System.Integer
Dim inputUsed As System.Integer
Dim value As System.Integer
 
value = instance.Decode(input, inputOffset, inputCount, output, outputOffset, maxOutputCount, inputUsed)
System.int Decode( 
   System.byte[] input,
   System.int inputOffset,
   System.int inputCount,
   System.byte[] output,
   System.int outputOffset,
   System.int maxOutputCount,
   out System.int inputUsed
)
function Decode( 
    input: System.Bytearray of;
    inputOffset: System.Integer;
    inputCount: System.Integer;
    output: System.Bytearray of;
    outputOffset: System.Integer;
    maxOutputCount: System.Integer;
   Out  inputUsed: System.Integer
): System.Integer; 
function Decode( 
   input : System.byte[],
   inputOffset : System.int,
   inputCount : System.int,
   output : System.byte[],
   outputOffset : System.int,
   maxOutputCount : System.int,
   inputUsed : System.int
) : System.int;
System.int Decode( 
   System.byte[]* input,
   System.int inputOffset,
   System.int inputCount,
   System.byte[]* output,
   System.int outputOffset,
   System.int maxOutputCount,
   [PARAMFLAG::Out] System.int inputUsed
) 
System.int Decode( 
   System.array<byte>^ input,
   System.int inputOffset,
   System.int inputCount,
   System.array<byte>^ output,
   System.int outputOffset,
   System.int maxOutputCount,
   [Out] System.int inputUsed
) 

Parameters

input
The input buffer from which to read the bytes to decompress.
inputOffset
The offset in the input buffer at which to start reading the bytes to decompress.
inputCount
The number of bytes to read from the input buffer.
output
The output buffer into which to write the decompressed bytes.
outputOffset
The offset in the output buffer at which to start writing the decompressed bytes.
maxOutputCount
The maximum number of decompressed bytes to write into the output buffer.
inputUsed
Returns the number of bytes read from the input buffer.

Return Value

The number of the decompressed bytes written into the output buffer.
Remarks

When Decode is called, the decoder consumes bytes from the input buffer and returns the number of bytes consumed in the inputUsed parameter and the number of compressed bytes produced in the return value.

Depending on the compression algorithm, a minimal amount of output buffer space might be required for decompressed bytes to be produced. When the output buffer space is insufficient for the decoder to produce any amount of decompressed bytes, it consumes input until its internal buffer is full but does not produce any output. Eventually both the returned inputUsed and the return value of Decode become 0, despite the provided inputCount being greater than 0. This indicates that maxOutputCount is too low for the decoder to operate and a larger output buffer space must be provided.

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

ICompressionDecoder Interface
ICompressionDecoder Members

Send Feedback