Show / Hide Table of Contents

Class DeflaterHuffman

This is the DeflaterHuffman class.

This class is not thread safe. This is inherent in the API, due to the split of Deflate and SetInput.

author of the original java version : Jochen Hoenicke

Inheritance
System.Object
DeflaterHuffman
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 DeflaterHuffman

Constructors

| Improve this Doc View Source

DeflaterHuffman(DeflaterPending)

Construct instance with pending buffer

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

Pending buffer to use

Fields

| Improve this Doc View Source

pending

Pending buffer to use

Declaration
public DeflaterPending pending
Field Value
Type Description
DeflaterPending

Methods

| Improve this Doc View Source

BitReverse(Int32)

Reverse the bits of a 16 bit value.

Declaration
public static short BitReverse(int toReverse)
Parameters
Type Name Description
System.Int32 toReverse

Value to reverse bits

Returns
Type Description
System.Int16

Value with bits reversed

| Improve this Doc View Source

CompressBlock()

Compress current buffer writing data to pending buffer

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

FlushBlock(Byte[], Int32, Int32, Boolean)

Flush block to output with compression

Declaration
public void FlushBlock(byte[] stored, int storedOffset, int storedLength, bool lastBlock)
Parameters
Type Name Description
System.Byte[] stored

Data to flush

System.Int32 storedOffset

Index of first byte to flush

System.Int32 storedLength

Count of bytes to flush

System.Boolean lastBlock

True if this is the last block

| Improve this Doc View Source

FlushStoredBlock(Byte[], Int32, Int32, Boolean)

Flush block to output with no compression

Declaration
public void FlushStoredBlock(byte[] stored, int storedOffset, int storedLength, bool lastBlock)
Parameters
Type Name Description
System.Byte[] stored

Data to write

System.Int32 storedOffset

Index of first byte to write

System.Int32 storedLength

Count of bytes to write

System.Boolean lastBlock

True if this is the last block

| Improve this Doc View Source

IsFull()

Get value indicating if internal buffer is full

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

true if buffer is full

| Improve this Doc View Source

Reset()

Reset internal state

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

SendAllTrees(Int32)

Write all trees to pending buffer

Declaration
public void SendAllTrees(int blTreeCodes)
Parameters
Type Name Description
System.Int32 blTreeCodes

The number/rank of treecodes to send.

| Improve this Doc View Source

TallyDist(Int32, Int32)

Add distance code and length to literal and distance trees

Declaration
public bool TallyDist(int distance, int length)
Parameters
Type Name Description
System.Int32 distance

Distance code

System.Int32 length

Length

Returns
Type Description
System.Boolean

Value indicating if internal buffer is full

| Improve this Doc View Source

TallyLit(Int32)

Add literal to buffer

Declaration
public bool TallyLit(int literal)
Parameters
Type Name Description
System.Int32 literal

Literal value to add to buffer.

Returns
Type Description
System.Boolean

Value indicating internal buffer is full

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