ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow Class Reference

Contains the output from the Inflation process. We need to have a window so that we can refer backwards into the output stream to repeat stuff.
Author of the original java version : John Leuner. More...

List of all members.

Public Member Functions

void Write (int abyte)
 Write a byte to this output window.
void Repeat (int len, int dist)
 Append a byte pattern already in the window itself.
int CopyStored (StreamManipulator input, int len)
 Copy from input manipulator to internal window.
void CopyDict (byte[] dict, int offset, int len)
 Copy dictionary to window.
int GetFreeSpace ()
 Get remaining unfilled space in window.
int GetAvailable ()
 Get bytes available for output in window.
int CopyOutput (byte[] output, int offset, int len)
 Copy contents of window to output.
void Reset ()
 Reset by clearing window so GetAvailableGetAvailable returns 0.

Private Member Functions

void SlowRepeat (int repStart, int len, int dist)

Private Attributes

byte[] window = new byte[WINDOW_SIZE]
int windowEnd = 0
int windowFilled = 0

Static Private Attributes

static int WINDOW_SIZE = 1 << 15
static int WINDOW_MASK = WINDOW_SIZE - 1


Detailed Description

Contains the output from the Inflation process. We need to have a window so that we can refer backwards into the output stream to repeat stuff.
Author of the original java version : John Leuner.

Definition at line 50 of file OutputWindow.cs.


Member Function Documentation

void ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::CopyDict byte[]  dict,
int  offset,
int  len
[inline]
 

Copy dictionary to window.

Parameters:
dict source dictionary
offset offset of start in source dictionary
len length of dictionary
Exceptions:
InvalidOperationException If window isnt empty

Definition at line 151 of file OutputWindow.cs.

int ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::CopyOutput byte[]  output,
int  offset,
int  len
[inline]
 

Copy contents of window to output.

Parameters:
output buffer to copy to
offset offset to start at
len number of bytes to count
Returns:
The number of bytes copied
Exceptions:
InvalidOperationException If a window underflow occurs

Definition at line 193 of file OutputWindow.cs.

int ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::CopyStored StreamManipulator  input,
int  len
[inline]
 

Copy from input manipulator to internal window.

Parameters:
input source of data
len length of data to copy
Returns:
the number of bytes copied

Definition at line 122 of file OutputWindow.cs.

References ICSharpCode::SharpZipLib::Zip::Compression::Streams::StreamManipulator::AvailableBytes, and ICSharpCode::SharpZipLib::Zip::Compression::Streams::StreamManipulator::CopyBytes().

int ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::GetAvailable  )  [inline]
 

Get bytes available for output in window.

Returns:
Number of bytes filled

Definition at line 178 of file OutputWindow.cs.

int ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::GetFreeSpace  )  [inline]
 

Get remaining unfilled space in window.

Returns:
Number of bytes left in window

Definition at line 169 of file OutputWindow.cs.

void ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::Repeat int  len,
int  dist
[inline]
 

Append a byte pattern already in the window itself.

Parameters:
len length of pattern to copy
dist distance from end of window pattern occurs
Exceptions:
InvalidOperationException If the repeated data overflows the window

Definition at line 93 of file OutputWindow.cs.

void ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::Reset  )  [inline]
 

Reset by clearing window so GetAvailableGetAvailable returns 0.

Definition at line 221 of file OutputWindow.cs.

void ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::SlowRepeat int  repStart,
int  len,
int  dist
[inline, private]
 

Definition at line 76 of file OutputWindow.cs.

void ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::Write int  abyte  )  [inline]
 

Write a byte to this output window.

Parameters:
abyte value to write
Exceptions:
InvalidOperationException if window is full

Definition at line 66 of file OutputWindow.cs.


Member Data Documentation

byte [] ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::window = new byte[WINDOW_SIZE] [private]
 

Definition at line 55 of file OutputWindow.cs.

int ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::WINDOW_MASK = WINDOW_SIZE - 1 [static, private]
 

Definition at line 53 of file OutputWindow.cs.

int ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::WINDOW_SIZE = 1 << 15 [static, private]
 

Definition at line 52 of file OutputWindow.cs.

int ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::windowEnd = 0 [private]
 

Definition at line 56 of file OutputWindow.cs.

int ICSharpCode::SharpZipLib::Zip::Compression::Streams::OutputWindow::windowFilled = 0 [private]
 

Definition at line 57 of file OutputWindow.cs.


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