C# Class ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow

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
Datei anzeigen Open project: icsharpcode/SharpZipLib Class Usage Examples

Public Methods

Method Description
CopyDict ( byte dictionary, int offset, int length ) : void

Copy dictionary to window

CopyOutput ( byte output, int offset, int len ) : int

Copy contents of window to output

CopyStored ( StreamManipulator input, int length ) : int

Copy from input manipulator to internal window

GetAvailable ( ) : int

Get bytes available for output in window

GetFreeSpace ( ) : int

Get remaining unfilled space in window

Repeat ( int length, int distance ) : void

Append a byte pattern already in the window itself

Reset ( ) : void

Reset by clearing window so GetAvailable returns 0

Write ( int value ) : void

Write a byte to this output window

Private Methods

Method Description
SlowRepeat ( int repStart, int length, int distance ) : void

Method Details

CopyDict() public method

Copy dictionary to window
/// If window isnt empty ///
public CopyDict ( byte dictionary, int offset, int length ) : void
dictionary byte source dictionary
offset int offset of start in source dictionary
length int length of dictionary
return void

CopyOutput() public method

Copy contents of window to output
/// If a window underflow occurs ///
public CopyOutput ( byte output, int offset, int len ) : int
output byte buffer to copy to
offset int offset to start at
len int number of bytes to count
return int

CopyStored() public method

Copy from input manipulator to internal window
public CopyStored ( StreamManipulator input, int length ) : int
input StreamManipulator source of data
length int length of data to copy
return int

GetAvailable() public method

Get bytes available for output in window
public GetAvailable ( ) : int
return int

GetFreeSpace() public method

Get remaining unfilled space in window
public GetFreeSpace ( ) : int
return int

Repeat() public method

Append a byte pattern already in the window itself
/// If the repeated data overflows the window ///
public Repeat ( int length, int distance ) : void
length int length of pattern to copy
distance int distance from end of window pattern occurs
return void

Reset() public method

Reset by clearing window so GetAvailable returns 0
public Reset ( ) : void
return void

Write() public method

Write a byte to this output window
/// if window is full ///
public Write ( int value ) : void
value int value to write
return void