Fingerprint_Card
Loading...
Searching...
No Matches
ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer Class Reference

This class is general purpose class for writing data to a buffer. More...

Inheritance diagram for ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer:

Public Member Functions

 PendingBuffer ()
 construct instance using default buffer size of 4096
 PendingBuffer (int bufferSize)
 construct instance using specified buffer size
void Reset ()
 Clear internal state/buffers.
void WriteByte (int value)
 Write a byte to buffer.
void WriteShort (int value)
 Write a short value to buffer LSB first.
void WriteInt (int value)
 write an integer LSB first
void WriteBlock (byte[] block, int offset, int length)
 Write a block of data to buffer.
void AlignToByte ()
 Align internal buffer on a byte boundary.
void WriteBits (int b, int count)
 Write bits to internal buffer.
void WriteShortMSB (int s)
 Write a short value to internal buffer most significant byte first.
int Flush (byte[] output, int offset, int length)
 Flushes the pending buffer into the given output array. If the output array is to small, only a partial flush is done.
byte[] ToByteArray ()
 Convert internal buffer to byte array. Buffer is empty on completion.

Properties

int BitCount [get]
 The number of bits written to the buffer.
bool IsFlushed [get]
 Indicates if buffer has been flushed.

Private Attributes

byte[] buffer_
 Internal work buffer.
int start
int end
uint bits
int bitCount

Detailed Description

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

Constructor & Destructor Documentation

◆ PendingBuffer() [1/2]

ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.PendingBuffer ( )

construct instance using default buffer size of 4096

◆ PendingBuffer() [2/2]

ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.PendingBuffer ( int bufferSize)

construct instance using specified buffer size

Parameters
bufferSizesize to use for internal buffer

Member Function Documentation

◆ AlignToByte()

void ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.AlignToByte ( )

Align internal buffer on a byte boundary.

◆ Flush()

int ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.Flush ( byte[] output,
int offset,
int length )

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

Parameters
outputThe output array.
offsetThe offset into output array.
lengthThe maximum number of bytes to store.
Returns
The number of bytes flushed.

◆ Reset()

void ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.Reset ( )

Clear internal state/buffers.

◆ ToByteArray()

byte[] ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.ToByteArray ( )

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

Returns
The internal buffer contents converted to a byte array.

◆ WriteBits()

void ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.WriteBits ( int b,
int count )

Write bits to internal buffer.

Parameters
bsource of bits
countnumber of bits to write

◆ WriteBlock()

void ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.WriteBlock ( byte[] block,
int offset,
int length )

Write a block of data to buffer.

Parameters
blockdata to write
offsetoffset of first byte to write
lengthnumber of bytes to write

◆ WriteByte()

void ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.WriteByte ( int value)

Write a byte to buffer.

Parameters
valueThe value to write

◆ WriteInt()

void ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.WriteInt ( int value)

write an integer LSB first

Parameters
valueThe value to write.

◆ WriteShort()

void ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.WriteShort ( int value)

Write a short value to buffer LSB first.

Parameters
valueThe value to write.

◆ WriteShortMSB()

void ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.WriteShortMSB ( int s)

Write a short value to internal buffer most significant byte first.

Parameters
svalue to write

Member Data Documentation

◆ bitCount

int ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.bitCount
private

◆ bits

uint ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.bits
private

◆ buffer_

byte [] ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.buffer_
private

Internal work buffer.

◆ end

int ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.end
private

◆ start

int ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.start
private

Property Documentation

◆ BitCount

int ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.BitCount
get

The number of bits written to the buffer.

◆ IsFlushed

bool ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.IsFlushed
get

Indicates if buffer has been flushed.


The documentation for this class was generated from the following file: