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

  dictionary | source dictionary
  offset | offset of start in source dictionary
  length | length of dictionary

Exceptions

  InvalidOperationException | If 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

  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

## ◆ CopyStored()

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

Copy from input manipulator to internal window.

Parameters

  input | source of data
  length | length 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

  length | length of pattern to copy
  distance | distance from end of window pattern occurs

Exceptions

  InvalidOperationException | If 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

  value | value to write

Exceptions

  InvalidOperationException | if 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
| static private

## ◆ WindowSize

const int ICSharpCode.SharpZipLib.Zip.Compression.Streams.OutputWindow.WindowSize = 1 << 15
| static private

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

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