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:
[legend]
Collaboration diagram for ICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputStream:
[legend]

## 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

  baseInputStream | The 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

  baseInputStream | The source of input data
  inf | The 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

  baseInputStream | The InputStream to read bytes from
  inflater | The decompressor to use
  bufferSize | Size 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

  buffer | The buffer to write data from
  offset | Offset of first byte to write
  count | The maximum number of bytes to write
  callback | The method to be called when the asynchronous write operation is completed
  state | A user-provided object that distinguishes this particular asynchronous write request from other requests

Returns
  An IAsyncResult that references the asynchronous write

Exceptions

  NotSupportedException | Any 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

  SharpZipBaseException | Stream 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

  buffer | The array to read and decompress data into
  offset | The offset indicating where the data should be placed
  count | The number of bytes to decompress

Returns
  The number of bytes read. Zero signals the end of stream

Exceptions

  SharpZipBaseException | Inflater 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

  offset | The relative offset to seek to.
  origin | The SeekOrigin defining where to seek from.

Returns
  The new position in the stream.

Exceptions

  NotSupportedException | Any 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

  value | The new length value for the stream.

Exceptions

  NotSupportedException | Any access

## ◆ Skip()

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

Skip specified number of bytes of uncompressed data.

Parameters

  count | Number of bytes to skip

Returns
  The number of bytes skipped, zero if the end of stream has been reached

Exceptions

  ArgumentOutOfRangeException | count 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

  buffer | Thew buffer containing data to write.
  offset | The offset of the first byte to write.
  count | The number of bytes to write.

Exceptions

  NotSupportedException | Any 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

  value | The byte to write.

Exceptions

  NotSupportedException | Any 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
| get set

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
| get set

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

Exceptions

  NotSupportedException | Attempting to set the position

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

- ICSharpCode.SharpZLib/Zip/Compression/Streams/InflaterInputStream.cs