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:

ICSharpCode::SharpZipLib::Zip::ZipFile::PartialInputStream ICSharpCode::SharpZipLib::Zip::ZipInputStream List of all members.

Public Member Functions

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 val)
 Set the length of the current stream Always throws a NotSupportedException.
override void Write (byte[] array, 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 val)
 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.
 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.
override void Close ()
 Closes the input stream. When IsStreamOwner is true the underlying stream is also closed.
override int Read (byte[] b, int off, int len)
 Decompresses data into the byte array.
long Skip (long n)
 Skip specified number of bytes of uncompressed data.

Protected Member Functions

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

Protected Attributes

Inflater inf
 Decompressor for this stream.
InflaterInputBuffer inputBuffer
 InflaterInputBufferInput buffer for this stream.
Stream baseInputStream
 Base stream the inflater reads from.
long csize
 The compressed size.

Properties

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

Private Attributes

bool isClosed = false
bool isStreamOwner = true

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 ICSharpCode::SharpZipLib::GZip::GZipInputStreamGZipInputStream.

Author of the original java version : John Leuner.

Definition at line 328 of file InflaterInputStream.cs.


Constructor & Destructor Documentation

ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::InflaterInputStream Stream  baseInputStream  )  [inline]
 

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

Parameters:
baseInputStream The InputStream to read bytes from

Definition at line 486 of file InflaterInputStream.cs.

ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::InflaterInputStream Stream  baseInputStream,
Inflater  inf
[inline]
 

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

Definition at line 500 of file InflaterInputStream.cs.

ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::InflaterInputStream Stream  baseInputStream,
Inflater  inflater,
int  bufferSize
[inline]
 

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

Definition at line 517 of file InflaterInputStream.cs.


Member Function Documentation

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

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 System::IAsyncResultIAsyncResult that references the asynchronous write
Exceptions:
NotSupportedException Any access

Definition at line 474 of file InflaterInputStream.cs.

override void ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::Close  )  [inline]
 

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

Reimplemented in ICSharpCode::SharpZipLib::Zip::ZipFile::PartialInputStream, and ICSharpCode::SharpZipLib::Zip::ZipInputStream.

Definition at line 551 of file InflaterInputStream.cs.

void ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::Fill  )  [inline, protected]
 

Fills the buffer with more data to decompress.

Exceptions:
SharpZipBaseException Stream ends early

Definition at line 567 of file InflaterInputStream.cs.

override void ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::Flush  )  [inline]
 

Flushes the baseInputStream.

Definition at line 419 of file InflaterInputStream.cs.

override int ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::Read byte[]  b,
int  off,
int  len
[inline]
 

Decompresses data into the byte array.

Parameters:
b The array to read and decompress data into
off The offset indicating where the data should be placed
len The number of bytes to decompress
Returns:
The number of bytes read. Zero signals the end of stream
Exceptions:
SharpZipBaseException Inflater needs a dictionary

Reimplemented in ICSharpCode::SharpZipLib::Zip::ZipFile::PartialInputStream, and ICSharpCode::SharpZipLib::Zip::ZipInputStream.

Definition at line 589 of file InflaterInputStream.cs.

override long ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::Seek long  offset,
SeekOrigin  origin
[inline]
 

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

Exceptions:
NotSupportedException Any access

Definition at line 429 of file InflaterInputStream.cs.

override void ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::SetLength long  val  )  [inline]
 

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

Exceptions:
NotSupportedException Any access

Definition at line 439 of file InflaterInputStream.cs.

long ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::Skip long  n  )  [inline]
 

Skip specified number of bytes of uncompressed data.

Parameters:
n Number of bytes to skip
Returns:
The number of bytes skipped, zero if the end of stream has been reached
Exceptions:
ArgumentOutOfRangeException Number of bytes to skip is zero or less

Definition at line 628 of file InflaterInputStream.cs.

void ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::StopDecrypting  )  [inline, protected]
 

Clear any cryptographic state.

Definition at line 651 of file InflaterInputStream.cs.

override void ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::Write byte[]  array,
int  offset,
int  count
[inline]
 

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

Exceptions:
NotSupportedException Any access

Definition at line 449 of file InflaterInputStream.cs.

override void ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::WriteByte byte  val  )  [inline]
 

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

Exceptions:
NotSupportedException Any access

Definition at line 459 of file InflaterInputStream.cs.


Member Data Documentation

Stream ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::baseInputStream [protected]
 

Base stream the inflater reads from.

Definition at line 343 of file InflaterInputStream.cs.

long ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::csize [protected]
 

The compressed size.

Definition at line 348 of file InflaterInputStream.cs.

Inflater ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::inf [protected]
 

Decompressor for this stream.

Definition at line 333 of file InflaterInputStream.cs.

InflaterInputBuffer ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::inputBuffer [protected]
 

InflaterInputBufferInput buffer for this stream.

Definition at line 338 of file InflaterInputStream.cs.

bool ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::isClosed = false [private]
 

Definition at line 350 of file InflaterInputStream.cs.

bool ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::isStreamOwner = true [private]
 

Definition at line 351 of file InflaterInputStream.cs.


Property Documentation

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.

Reimplemented in ICSharpCode::SharpZipLib::Zip::ZipFile::PartialInputStream, and ICSharpCode::SharpZipLib::Zip::ZipInputStream.

Definition at line 541 of file InflaterInputStream.cs.

override bool ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::CanRead [get]
 

Gets a value indicating whether the current stream supports reading.

Definition at line 369 of file InflaterInputStream.cs.

override bool ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::CanSeek [get]
 

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

Definition at line 378 of file InflaterInputStream.cs.

override bool ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::CanWrite [get]
 

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

Definition at line 387 of file InflaterInputStream.cs.

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.

Definition at line 361 of file InflaterInputStream.cs.

override long ICSharpCode::SharpZipLib::Zip::Compression::Streams::InflaterInputStream::Length [get]
 

A value representing the length of the stream in bytes.

Definition at line 396 of file InflaterInputStream.cs.

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

Definition at line 407 of file InflaterInputStream.cs.


The documentation for this class was generated from the following file:
Generated on Fri Jun 23 21:50:08 2006 for OblivionModTranslator by  doxygen 1.4.6-NO