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:
[legend]

## 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

  bufferSize | size 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

  output | The output array.
  offset | The offset into output array.
  length | The 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

  b | source of bits
  count | number 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

  block | data to write
  offset | offset of first byte to write
  length | number of bytes to write

## ◆ WriteByte()

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

Write a byte to buffer.

Parameters

  value | The value to write

## ◆ WriteInt()

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

write an integer LSB first

Parameters

  value | The value to write.

## ◆ WriteShort()

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

Write a short value to buffer LSB first.

Parameters

  value | The 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

  s | value 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:

- ICSharpCode.SharpZLib/Zip/Compression/PendingBuffer.cs