Fingerprint_Card
Loading...
Searching...
No Matches
ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream Class Reference

This filter stream is used to decompress data compressed using the "deflate" format. The "deflate" format is described in RFC 1951. More...

Inheritance diagram for ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream:
Collaboration diagram for ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream:

Public Member Functions

 InflaterInputStream (Stream baseInputStream)
 Create an InflaterInputStream with the default decompressor and a default buffer size of 4KB.
 InflaterInputStream (Stream baseInputStream, Inflater inf)
 Create an InflaterInputStream with the specified decompressor and a default buffer size of 4KB.
 InflaterInputStream (Stream baseInputStream, Inflater inflater, int bufferSize)
 Create an InflaterInputStream with the specified decompressor and the specified buffer size.
long Skip (long count)
 Skip specified number of bytes of uncompressed data.
override void Flush ()
 Flushes the baseInputStream.
override long Seek (long offset, SeekOrigin origin)
 Sets the position within the current stream Always throws a NotSupportedException.
override void SetLength (long value)
 Set the length of the current stream Always throws a NotSupportedException.
override void Write (byte[] buffer, int offset, int count)
 Writes a sequence of bytes to stream and advances the current position This method always throws a NotSupportedException.
override void WriteByte (byte value)
 Writes one byte to the current stream and advances the current position Always throws a NotSupportedException.
override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
 Entry point to begin an asynchronous write. Always throws a NotSupportedException.
override void Close ()
 Closes the input stream. When IsStreamOwner is true the underlying stream is also closed.
override int Read (byte[] buffer, int offset, int count)
 Reads decompressed data into the provided buffer byte array.

Protected Member Functions

void StopDecrypting ()
 Clear any cryptographic state.
void Fill ()
 Fills the buffer with more data to decompress.

Protected Attributes

Inflater inf
 Decompressor for this stream.
InflaterInputBuffer inputBuffer
 Input buffer for this stream.
long csize
 The compressed size.

Properties

bool IsStreamOwner [get, set]
 Get/set flag indicating ownership of underlying stream. When the flag is true Close will close the underlying stream also.
virtual int Available [get]
 Returns 0 once the end of the stream (EOF) has been reached. Otherwise returns 1.
override bool CanRead [get]
 Gets a value indicating whether the current stream supports reading.
override bool CanSeek [get]
 Gets a value of false indicating seeking is not supported for this stream.
override bool CanWrite [get]
 Gets a value of false indicating that this stream is not writeable.
override long Length [get]
 A value representing the length of the stream in bytes.
override long Position [get, set]
 The current position within the stream. Throws a NotSupportedException when attempting to set the position.

Private Attributes

Stream baseInputStream
 Base stream the inflater reads from.
bool isClosed
 Flag indicating wether this instance has been closed or not.
bool isStreamOwner = true
 Flag indicating wether this instance is designated the stream owner. When closing if this flag is true the underlying stream is closed.

Detailed Description

This filter stream is used to decompress data compressed using the "deflate" format. The "deflate" format is described in RFC 1951.

This stream may form the basis for other decompression filters, such as the GZipInputStream.

Author of the original java version : John Leuner.

Constructor & Destructor Documentation

◆ InflaterInputStream() [1/3]

ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.InflaterInputStream ( Stream baseInputStream)

Create an InflaterInputStream with the default decompressor and a default buffer size of 4KB.

Parameters
baseInputStreamThe InputStream to read bytes from

◆ InflaterInputStream() [2/3]

ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.InflaterInputStream ( Stream baseInputStream,
Inflater inf )

Create an InflaterInputStream with the specified decompressor and a default buffer size of 4KB.

Parameters
baseInputStreamThe source of input data
infThe decompressor used to decompress data read from baseInputStream

◆ InflaterInputStream() [3/3]

ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.InflaterInputStream ( Stream baseInputStream,
Inflater inflater,
int bufferSize )

Create an InflaterInputStream with the specified decompressor and the specified buffer size.

Parameters
baseInputStreamThe InputStream to read bytes from
inflaterThe decompressor to use
bufferSizeSize of the buffer to use

Member Function Documentation

◆ BeginWrite()

override IAsyncResult ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.BeginWrite ( byte[] buffer,
int offset,
int count,
AsyncCallback callback,
object state )

Entry point to begin an asynchronous write. Always throws a NotSupportedException.

Parameters
bufferThe buffer to write data from
offsetOffset of first byte to write
countThe maximum number of bytes to write
callbackThe method to be called when the asynchronous write operation is completed
stateA user-provided object that distinguishes this particular asynchronous write request from other requests
Returns
An IAsyncResult that references the asynchronous write
Exceptions
NotSupportedExceptionAny access

◆ Close()

override void ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.Close ( )

Closes the input stream. When IsStreamOwner is true the underlying stream is also closed.

◆ Fill()

void ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.Fill ( )
protected

Fills the buffer with more data to decompress.

Exceptions
SharpZipBaseExceptionStream ends early
Here is the caller graph for this function:

◆ Flush()

override void ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.Flush ( )

Flushes the baseInputStream.

◆ Read()

override int ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.Read ( byte[] buffer,
int offset,
int count )

Reads decompressed data into the provided buffer byte array.

Parameters
bufferThe array to read and decompress data into
offsetThe offset indicating where the data should be placed
countThe number of bytes to decompress
Returns
The number of bytes read. Zero signals the end of stream
Exceptions
SharpZipBaseExceptionInflater needs a dictionary
Here is the call graph for this function:

◆ Seek()

override long ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.Seek ( long offset,
SeekOrigin origin )

Sets the position within the current stream Always throws a NotSupportedException.

Parameters
offsetThe relative offset to seek to.
originThe SeekOrigin defining where to seek from.
Returns
The new position in the stream.
Exceptions
NotSupportedExceptionAny access

◆ SetLength()

override void ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.SetLength ( long value)

Set the length of the current stream Always throws a NotSupportedException.

Parameters
valueThe new length value for the stream.
Exceptions
NotSupportedExceptionAny access

◆ Skip()

long ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.Skip ( long count)

Skip specified number of bytes of uncompressed data.

Parameters
countNumber of bytes to skip
Returns
The number of bytes skipped, zero if the end of stream has been reached
Exceptions
ArgumentOutOfRangeExceptioncount The number of bytes to skip is less than or equal to zero.

◆ StopDecrypting()

void ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.StopDecrypting ( )
protected

Clear any cryptographic state.

Here is the caller graph for this function:

◆ Write()

override void ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.Write ( byte[] buffer,
int offset,
int count )

Writes a sequence of bytes to stream and advances the current position This method always throws a NotSupportedException.

Parameters
bufferThew buffer containing data to write.
offsetThe offset of the first byte to write.
countThe number of bytes to write.
Exceptions
NotSupportedExceptionAny access

◆ WriteByte()

override void ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.WriteByte ( byte value)

Writes one byte to the current stream and advances the current position Always throws a NotSupportedException.

Parameters
valueThe byte to write.
Exceptions
NotSupportedExceptionAny access

Member Data Documentation

◆ baseInputStream

Stream ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.baseInputStream
private

Base stream the inflater reads from.

◆ csize

long ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.csize
protected

The compressed size.

◆ inf

Inflater ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.inf
protected

Decompressor for this stream.

◆ inputBuffer

InflaterInputBuffer ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.inputBuffer
protected

Input buffer for this stream.

◆ isClosed

bool ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.isClosed
private

Flag indicating wether this instance has been closed or not.

◆ isStreamOwner

bool ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.isStreamOwner = true
private

Flag indicating wether this instance is designated the stream owner. When closing if this flag is true the underlying stream is closed.

Property Documentation

◆ Available

virtual int ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.Available
get

Returns 0 once the end of the stream (EOF) has been reached. Otherwise returns 1.

◆ CanRead

override bool ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.CanRead
get

Gets a value indicating whether the current stream supports reading.

◆ CanSeek

override bool ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.CanSeek
get

Gets a value of false indicating seeking is not supported for this stream.

◆ CanWrite

override bool ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.CanWrite
get

Gets a value of false indicating that this stream is not writeable.

◆ IsStreamOwner

bool ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.IsStreamOwner
getset

Get/set flag indicating ownership of underlying stream. When the flag is true Close will close the underlying stream also.

The default value is true.

◆ Length

override long ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.Length
get

A value representing the length of the stream in bytes.

◆ Position

override long ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.Position
getset

The current position within the stream. Throws a NotSupportedException when attempting to set the position.

Exceptions
NotSupportedExceptionAttempting to set the position

The documentation for this class was generated from the following file: