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 |
public int Flush(byte[] output, int offset, int length)
{
if (bitCount >= 8) {
buffer_[end++] = unchecked((byte)bits);
bits >>= 8;
bitCount -= 8;
}
if (length > end - start) {
length = end - start;
System.Array.Copy(buffer_, start, output, offset, length);
start = 0;
end = 0;
} else {
System.Array.Copy(buffer_, start, output, offset, length);
start += length;
}
return length;
}