Export (0) Print
Expand All

DeflateStream.Read Method

Reads a number of decompressed bytes into the specified byte array.

Namespace:  System.IO.Compression
Assembly:  System (in System.dll)

abstract Read : 
        array:byte[] * 
        offset:int * 
        count:int -> int 
override Read : 
        array:byte[] * 
        offset:int * 
        count:int -> int 

Parameters

array
Type: System.Byte[]
The array to store decompressed bytes.
offset
Type: System.Int32
The byte offset in array at which the read bytes will be placed.
count
Type: System.Int32
The maximum number of decompressed bytes to read.

Return Value

Type: System.Int32
The number of bytes that were read into the byte array.

ExceptionCondition
ArgumentNullException

array is a null reference (Nothing in Visual Basic).

InvalidOperationException

The CompressionMode value was Compress when the object was created.

- or -

The underlying stream does not support reading.

ArgumentOutOfRangeException

offset or count is less than zero.

-or-

array length minus the index starting point is less than count.

InvalidDataException

The data is in an invalid format.

ObjectDisposedException

The stream is closed.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft