Show / Hide Table of Contents

Class 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

Inheritance
System.Object
OutputWindow
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ICSharpCode.SharpZipLib.Zip.Compression.Streams
Assembly: ICSharpCode.SharpZipLib.dll
Syntax
public class OutputWindow

Methods

| Improve this Doc View Source

CopyDict(Byte[], Int32, Int32)

Copy dictionary to window

Declaration
public void CopyDict(byte[] dictionary, int offset, int length)
Parameters
Type Name Description
System.Byte[] dictionary

source dictionary

System.Int32 offset

offset of start in source dictionary

System.Int32 length

length of dictionary

Exceptions
Type Condition
System.InvalidOperationException

If window isnt empty

| Improve this Doc View Source

CopyOutput(Byte[], Int32, Int32)

Copy contents of window to output

Declaration
public int CopyOutput(byte[] output, int offset, int len)
Parameters
Type Name Description
System.Byte[] output

buffer to copy to

System.Int32 offset

offset to start at

System.Int32 len

number of bytes to count

Returns
Type Description
System.Int32

The number of bytes copied

Exceptions
Type Condition
System.InvalidOperationException

If a window underflow occurs

| Improve this Doc View Source

CopyStored(StreamManipulator, Int32)

Copy from input manipulator to internal window

Declaration
public int CopyStored(StreamManipulator input, int length)
Parameters
Type Name Description
StreamManipulator input

source of data

System.Int32 length

length of data to copy

Returns
Type Description
System.Int32

the number of bytes copied

| Improve this Doc View Source

GetAvailable()

Get bytes available for output in window

Declaration
public int GetAvailable()
Returns
Type Description
System.Int32

Number of bytes filled

| Improve this Doc View Source

GetFreeSpace()

Get remaining unfilled space in window

Declaration
public int GetFreeSpace()
Returns
Type Description
System.Int32

Number of bytes left in window

| Improve this Doc View Source

Repeat(Int32, Int32)

Append a byte pattern already in the window itself

Declaration
public void Repeat(int length, int distance)
Parameters
Type Name Description
System.Int32 length

length of pattern to copy

System.Int32 distance

distance from end of window pattern occurs

Exceptions
Type Condition
System.InvalidOperationException

If the repeated data overflows the window

| Improve this Doc View Source

Reset()

Reset by clearing window so GetAvailable returns 0

Declaration
public void Reset()
| Improve this Doc View Source

Write(Int32)

Write a byte to this output window

Declaration
public void Write(int value)
Parameters
Type Name Description
System.Int32 value

value to write

Exceptions
Type Condition
System.InvalidOperationException

if window is full

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2000-2022 SharpZipLib Contributors