Fingerprint_Card
Loading...
Searching...
No Matches
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...

Public Member Functions

void Write (int value)
 Write a byte to this output window.
void Repeat (int length, int distance)
 Append a byte pattern already in the window itself.
int CopyStored (StreamManipulator input, int length)
 Copy from input manipulator to internal window.
void CopyDict (byte[] dictionary, int offset, int length)
 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 GetAvailable returns 0.

Private Member Functions

void SlowRepeat (int repStart, int length, int distance)

Private Attributes

byte[] window = new byte[WindowSize]
int windowEnd
int windowFilled

Static Private Attributes

const int WindowSize = 1 << 15
const int WindowMask = WindowSize - 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.

Member Function Documentation

◆ CopyDict()

void ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.CopyDict ( byte[] dictionary,
int offset,
int length )

Copy dictionary to window.

Parameters
dictionarysource dictionary
offsetoffset of start in source dictionary
lengthlength of dictionary
Exceptions
InvalidOperationExceptionIf window isnt empty

◆ CopyOutput()

int ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.CopyOutput ( byte[] output,
int offset,
int len )

Copy contents of window to output.

Parameters
outputbuffer to copy to
offsetoffset to start at
lennumber of bytes to count
Returns
The number of bytes copied
Exceptions
InvalidOperationExceptionIf a window underflow occurs

◆ CopyStored()

int ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.CopyStored ( StreamManipulator input,
int length )

Copy from input manipulator to internal window.

Parameters
inputsource of data
lengthlength of data to copy
Returns
the number of bytes copied
Here is the call graph for this function:

◆ GetAvailable()

int ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.GetAvailable ( )

Get bytes available for output in window.

Returns
Number of bytes filled

◆ GetFreeSpace()

int ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.GetFreeSpace ( )

Get remaining unfilled space in window.

Returns
Number of bytes left in window

◆ Repeat()

void ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.Repeat ( int length,
int distance )

Append a byte pattern already in the window itself.

Parameters
lengthlength of pattern to copy
distancedistance from end of window pattern occurs
Exceptions
InvalidOperationExceptionIf the repeated data overflows the window
Here is the call graph for this function:

◆ Reset()

void ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.Reset ( )

Reset by clearing window so GetAvailable returns 0.

◆ SlowRepeat()

void ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.SlowRepeat ( int repStart,
int length,
int distance )
private
Here is the caller graph for this function:

◆ Write()

void ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.Write ( int value)

Write a byte to this output window.

Parameters
valuevalue to write
Exceptions
InvalidOperationExceptionif window is full

Member Data Documentation

◆ window

byte [] ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.window = new byte[WindowSize]
private

◆ windowEnd

int ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.windowEnd
private

◆ windowFilled

int ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.windowFilled
private

◆ WindowMask

const int ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.WindowMask = WindowSize - 1
staticprivate

◆ WindowSize

const int ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.WindowSize = 1 << 15
staticprivate

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