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

This class is general purpose class for writing data to a buffer. It allows you to write bits as well as bytes Based on DeflaterPending.java author of the original java version : Jochen Hoenicke
Afficher le fichier Open project: icsharpcode/SharpZipLib

Méthodes publiques

Méthode Description
AlignToByte ( ) : void

Align internal buffer on a byte boundary

Flush ( byte output, int offset, int length ) : int

Flushes the pending buffer into the given output array. If the output array is to small, only a partial flush is done.

PendingBuffer ( ) : System

construct instance using default buffer size of 4096

PendingBuffer ( int bufferSize ) : System

construct instance using specified buffer size

Reset ( ) : void

Clear internal state/buffers

ToByteArray ( ) : byte[]

Convert internal buffer to byte array. Buffer is empty on completion

WriteBits ( int b, int count ) : void

Write bits to internal buffer

WriteBlock ( byte block, int offset, int length ) : void

Write a block of data to buffer

WriteByte ( int value ) : void

Write a byte to buffer

WriteInt ( int value ) : void

write an integer LSB first

WriteShort ( int value ) : void

Write a short value to buffer LSB first

WriteShortMSB ( int s ) : void

Write a short value to internal buffer most significant byte first

Method Details

AlignToByte() public méthode

Align internal buffer on a byte boundary
public AlignToByte ( ) : void
Résultat void

Flush() public méthode

Flushes the pending buffer into the given output array. If the output array is to small, only a partial flush is done.
public Flush ( byte output, int offset, int length ) : int
output byte The output array.
offset int The offset into output array.
length int The maximum number of bytes to store.
Résultat int

PendingBuffer() public méthode

construct instance using default buffer size of 4096
public PendingBuffer ( ) : System
Résultat System

PendingBuffer() public méthode

construct instance using specified buffer size
public PendingBuffer ( int bufferSize ) : System
bufferSize int /// size to use for internal buffer ///
Résultat System

Reset() public méthode

Clear internal state/buffers
public Reset ( ) : void
Résultat void

ToByteArray() public méthode

Convert internal buffer to byte array. Buffer is empty on completion
public ToByteArray ( ) : byte[]
Résultat byte[]

WriteBits() public méthode

Write bits to internal buffer
public WriteBits ( int b, int count ) : void
b int source of bits
count int number of bits to write
Résultat void

WriteBlock() public méthode

Write a block of data to buffer
public WriteBlock ( byte block, int offset, int length ) : void
block byte data to write
offset int offset of first byte to write
length int number of bytes to write
Résultat void

WriteByte() public méthode

Write a byte to buffer
public WriteByte ( int value ) : void
value int /// The value to write ///
Résultat void

WriteInt() public méthode

write an integer LSB first
public WriteInt ( int value ) : void
value int The value to write.
Résultat void

WriteShort() public méthode

Write a short value to buffer LSB first
public WriteShort ( int value ) : void
value int /// The value to write. ///
Résultat void

WriteShortMSB() public méthode

Write a short value to internal buffer most significant byte first
public WriteShortMSB ( int s ) : void
s int value to write
Résultat void