Show / Hide Table of Contents

Class DeflaterEngine

Low level compression engine for deflate algorithm which uses a 32K sliding window with secondary compression from Huffman/Shannon-Fano codes.

Inheritance
System.Object
DeflaterEngine
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
Assembly: ICSharpCode.SharpZipLib.dll
Syntax
public class DeflaterEngine

Constructors

| Improve this Doc View Source

DeflaterEngine(DeflaterPending)

Construct instance with pending buffer Adler calculation will be performed

Declaration
public DeflaterEngine(DeflaterPending pending)
Parameters
Type Name Description
DeflaterPending pending

Pending buffer to use

| Improve this Doc View Source

DeflaterEngine(DeflaterPending, Boolean)

Construct instance with pending buffer

Declaration
public DeflaterEngine(DeflaterPending pending, bool noAdlerCalculation)
Parameters
Type Name Description
DeflaterPending pending

Pending buffer to use

System.Boolean noAdlerCalculation

If no adler calculation should be performed

Properties

| Improve this Doc View Source

Adler

Get current value of Adler checksum

Declaration
public int Adler { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Strategy

Get/set the deflate strategy

Declaration
public DeflateStrategy Strategy { get; set; }
Property Value
Type Description
DeflateStrategy
| Improve this Doc View Source

TotalIn

Total data processed

Declaration
public long TotalIn { get; }
Property Value
Type Description
System.Int64

Methods

| Improve this Doc View Source

Deflate(Boolean, Boolean)

Deflate drives actual compression of data

Declaration
public bool Deflate(bool flush, bool finish)
Parameters
Type Name Description
System.Boolean flush

True to flush input buffers

System.Boolean finish

Finish deflation with the current input.

Returns
Type Description
System.Boolean

Returns true if progress has been made.

| Improve this Doc View Source

FillWindow()

Fill the window

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

NeedsInput()

Determines if more input is needed.

Declaration
public bool NeedsInput()
Returns
Type Description
System.Boolean

Return true if input is needed via SetInput

| Improve this Doc View Source

Reset()

Reset internal state

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

ResetAdler()

Reset Adler checksum

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

SetDictionary(Byte[], Int32, Int32)

Set compression dictionary

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

The buffer containing the dictionary data

System.Int32 offset

The offset in the buffer for the first byte of data

System.Int32 length

The length of the dictionary data.

| Improve this Doc View Source

SetInput(Byte[], Int32, Int32)

Sets input data to be deflated. Should only be called when

NeedsInput()
returns true

Declaration
public void SetInput(byte[] buffer, int offset, int count)
Parameters
Type Name Description
System.Byte[] buffer

The buffer containing input data.

System.Int32 offset

The offset of the first byte of data.

System.Int32 count

The number of bytes of data to use as input.

| Improve this Doc View Source

SetLevel(Int32)

Set the deflate level (0-9)

Declaration
public void SetLevel(int level)
Parameters
Type Name Description
System.Int32 level

The value to set the level to.

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