C# Class System.IO.Compression.DeflateStream

Inheritance: Stream, IDisposable
Show file Open project: dotnet/corefx Class Usage Examples

Private Properties

Property Type Description
AsyncOperationCompleting void
AsyncOperationStarting void
DeflateStream System.Buffers
DeflateStream System.Buffers
EnsureBufferInitialized void
EnsureCompressionMode void
EnsureDecompressionMode void
EnsureNoActiveAsyncOperation void
EnsureNotDisposed void
FlushAsyncCore System.Threading.Task
FlushBuffers void
InitializeBuffer void
InitializeDeflater void
InitializeInflater void
PurgeBuffers void
ReadAsyncCore Task
ThrowCannotReadFromDeflateStreamException void
ThrowCannotWriteToDeflateStreamException void
ThrowInvalidBeginCall void
ThrowStreamClosedException void
ValidateParameters void
WriteAsyncCore System.Threading.Task
WriteDeflaterOutput void
WriteDeflaterOutputAsync System.Threading.Task

Public Methods

Method Description
BeginRead ( byte buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
BeginWrite ( byte array, int offset, int count, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
CopyToAsync ( Stream destination, int bufferSize, CancellationToken cancellationToken ) : System.Threading.Task
DeflateStream ( System stream, System compressionLevel )
DeflateStream ( System stream, System compressionLevel, bool leaveOpen )
DeflateStream ( Stream stream, CompressionLevel compressionLevel ) : System.Buffers
DeflateStream ( Stream stream, CompressionLevel compressionLevel, bool leaveOpen ) : System.Buffers
DeflateStream ( Stream stream, CompressionMode mode ) : System.Buffers
DeflateStream ( Stream stream, CompressionMode mode, bool leaveOpen ) : System.Buffers
EndRead ( IAsyncResult asyncResult ) : int
EndWrite ( IAsyncResult asyncResult ) : void
Flush ( ) : void
FlushAsync ( CancellationToken cancellationToken ) : System.Threading.Task
Read ( byte array, int offset, int count ) : int
ReadAsync ( byte array, int offset, int count, System cancellationToken ) : System.Threading.Tasks.Task
ReadAsync ( byte array, int offset, int count, CancellationToken cancellationToken ) : Task
ReadByte ( ) : int
Seek ( long offset, SeekOrigin origin ) : long
Seek ( long offset, System origin ) : long
SetLength ( long value ) : void
Write ( byte array, int offset, int count ) : void
WriteAsync ( byte array, int offset, int count, System cancellationToken ) : System.Threading.Tasks.Task
WriteAsync ( byte array, int offset, int count, CancellationToken cancellationToken ) : System.Threading.Task

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
AsyncOperationCompleting ( ) : void
AsyncOperationStarting ( ) : void
DeflateStream ( Stream stream, CompressionLevel compressionLevel, bool leaveOpen, int windowBits ) : System.Buffers

Internal constructor to specify the compressionlevel as well as the windowbits

DeflateStream ( Stream stream, CompressionMode mode, bool leaveOpen, int windowBits ) : System.Buffers

Internal constructor to check stream validity and call the correct initialization function depending on the value of the CompressionMode given.

EnsureBufferInitialized ( ) : void
EnsureCompressionMode ( ) : void
EnsureDecompressionMode ( ) : void
EnsureNoActiveAsyncOperation ( ) : void
EnsureNotDisposed ( ) : void
FlushAsyncCore ( CancellationToken cancellationToken ) : System.Threading.Task
FlushBuffers ( ) : void
InitializeBuffer ( ) : void
InitializeDeflater ( Stream stream, bool leaveOpen, int windowBits, CompressionLevel compressionLevel ) : void

Sets up this DeflateStream to be used for Zlib Deflation/Compression

InitializeInflater ( Stream stream, bool leaveOpen, int windowBits ) : void

Sets up this DeflateStream to be used for Zlib Inflation/Decompression

PurgeBuffers ( bool disposing ) : void
ReadAsyncCore ( Task readTask, byte array, int offset, int count, CancellationToken cancellationToken ) : Task
ThrowCannotReadFromDeflateStreamException ( ) : void
ThrowCannotWriteToDeflateStreamException ( ) : void
ThrowInvalidBeginCall ( ) : void
ThrowStreamClosedException ( ) : void
ValidateParameters ( byte array, int offset, int count ) : void
WriteAsyncCore ( byte array, int offset, int count, CancellationToken cancellationToken ) : System.Threading.Task
WriteDeflaterOutput ( ) : void
WriteDeflaterOutputAsync ( CancellationToken cancellationToken ) : System.Threading.Task

Writes the bytes that have already been deflated

Method Details

BeginRead() public method

public BeginRead ( byte buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
buffer byte
offset int
count int
asyncCallback AsyncCallback
asyncState object
return IAsyncResult

BeginWrite() public method

public BeginWrite ( byte array, int offset, int count, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
array byte
offset int
count int
asyncCallback AsyncCallback
asyncState object
return IAsyncResult

CopyToAsync() public method

public CopyToAsync ( Stream destination, int bufferSize, CancellationToken cancellationToken ) : System.Threading.Task
destination Stream
bufferSize int
cancellationToken System.Threading.CancellationToken
return System.Threading.Task

DeflateStream() public method

public DeflateStream ( System stream, System compressionLevel )
stream System
compressionLevel System

DeflateStream() public method

public DeflateStream ( System stream, System compressionLevel, bool leaveOpen )
stream System
compressionLevel System
leaveOpen bool

DeflateStream() public method

public DeflateStream ( Stream stream, CompressionLevel compressionLevel ) : System.Buffers
stream Stream
compressionLevel CompressionLevel
return System.Buffers

DeflateStream() public method

public DeflateStream ( Stream stream, CompressionLevel compressionLevel, bool leaveOpen ) : System.Buffers
stream Stream
compressionLevel CompressionLevel
leaveOpen bool
return System.Buffers

DeflateStream() public method

public DeflateStream ( Stream stream, CompressionMode mode ) : System.Buffers
stream Stream
mode CompressionMode
return System.Buffers

DeflateStream() public method

public DeflateStream ( Stream stream, CompressionMode mode, bool leaveOpen ) : System.Buffers
stream Stream
mode CompressionMode
leaveOpen bool
return System.Buffers

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

EndRead() public method

public EndRead ( IAsyncResult asyncResult ) : int
asyncResult IAsyncResult
return int

EndWrite() public method

public EndWrite ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
return void

Flush() public method

public Flush ( ) : void
return void

FlushAsync() public method

public FlushAsync ( CancellationToken cancellationToken ) : System.Threading.Task
cancellationToken System.Threading.CancellationToken
return System.Threading.Task

Read() public method

public Read ( byte array, int offset, int count ) : int
array byte
offset int
count int
return int

ReadAsync() public method

public ReadAsync ( byte array, int offset, int count, System cancellationToken ) : System.Threading.Tasks.Task
array byte
offset int
count int
cancellationToken System
return System.Threading.Tasks.Task

ReadAsync() public method

public ReadAsync ( byte array, int offset, int count, CancellationToken cancellationToken ) : Task
array byte
offset int
count int
cancellationToken System.Threading.CancellationToken
return Task

ReadByte() public method

public ReadByte ( ) : int
return int

Seek() public method

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
return long

Seek() public method

public Seek ( long offset, System origin ) : long
offset long
origin System
return long

SetLength() public method

public SetLength ( long value ) : void
value long
return void

Write() public method

public Write ( byte array, int offset, int count ) : void
array byte
offset int
count int
return void

WriteAsync() public method

public WriteAsync ( byte array, int offset, int count, System cancellationToken ) : System.Threading.Tasks.Task
array byte
offset int
count int
cancellationToken System
return System.Threading.Tasks.Task

WriteAsync() public method

public WriteAsync ( byte array, int offset, int count, CancellationToken cancellationToken ) : System.Threading.Task
array byte
offset int
count int
cancellationToken System.Threading.CancellationToken
return System.Threading.Task