C# Class ICSharpCode.SharpZipLib.Zip.Compression.DeflaterEngine

Low level compression engine for deflate algorithm which uses a 32K sliding window with secondary compression from Huffman/Shannon-Fano codes.
Afficher le fichier Open project: icsharpcode/SharpZipLib Class Usage Examples

Méthodes publiques

Méthode Description
Deflate ( bool flush, bool finish ) : bool

Deflate drives actual compression of data

DeflaterEngine ( DeflaterPending pending ) : System

Construct instance with pending buffer

FillWindow ( ) : void

Fill the window

NeedsInput ( ) : bool

Determines if more input is needed.

Reset ( ) : void

Reset internal state

ResetAdler ( ) : void

Reset Adler checksum

SetDictionary ( byte buffer, int offset, int length ) : void

Set compression dictionary

SetInput ( byte buffer, int offset, int count ) : void

Sets input data to be deflated. Should only be called when NeedsInput() returns true

SetLevel ( int level ) : void

Set the deflate level (0-9)

Private Methods

Méthode Description
DeflateFast ( bool flush, bool finish ) : bool
DeflateSlow ( bool flush, bool finish ) : bool
DeflateStored ( bool flush, bool finish ) : bool
FindLongestMatch ( int curMatch ) : bool

Find the best (longest) string in the window matching the string starting at strstart. Preconditions: strstart + DeflaterConstants.MAX_MATCH <= window.length.

InsertString ( ) : int

Inserts the current string in the head hash and returns the previous value for this hash.

SlideWindow ( ) : void
UpdateHash ( ) : void

Method Details

Deflate() public méthode

Deflate drives actual compression of data
public Deflate ( bool flush, bool finish ) : bool
flush bool True to flush input buffers
finish bool Finish deflation with the current input.
Résultat bool

DeflaterEngine() public méthode

Construct instance with pending buffer
public DeflaterEngine ( DeflaterPending pending ) : System
pending DeflaterPending /// Pending buffer to use ///
Résultat System

FillWindow() public méthode

Fill the window
public FillWindow ( ) : void
Résultat void

NeedsInput() public méthode

Determines if more input is needed.
public NeedsInput ( ) : bool
Résultat bool

Reset() public méthode

Reset internal state
public Reset ( ) : void
Résultat void

ResetAdler() public méthode

Reset Adler checksum
public ResetAdler ( ) : void
Résultat void

SetDictionary() public méthode

Set compression dictionary
public SetDictionary ( byte buffer, int offset, int length ) : void
buffer byte The buffer containing the dictionary data
offset int The offset in the buffer for the first byte of data
length int The length of the dictionary data.
Résultat void

SetInput() public méthode

Sets input data to be deflated. Should only be called when NeedsInput() returns true
public SetInput ( byte buffer, int offset, int count ) : void
buffer byte The buffer containing input data.
offset int The offset of the first byte of data.
count int The number of bytes of data to use as input.
Résultat void

SetLevel() public méthode

Set the deflate level (0-9)
public SetLevel ( int level ) : void
level int The value to set the level to.
Résultat void