Click or drag to resize

PatternCompressorCompress(Byte, Int32, Int32) Method

Compresses length bytes of data in the given buffer, starting at offset.

Namespace: GSF.IO.Compression
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.253-beta+ffb7163c9e3b771705bc5b9aa3f09870f2cb9e2c
Syntax
public int Compress(
	byte[] buffer,
	int offset,
	int length
)
View Source

Parameters

buffer  Byte
The buffer to be compressed.
offset  Int32
The amount of data to ignore at the start of the buffer.
length  Int32
The amount of data to be compressed. Must be a multiple of four.

Return Value

Int32
The size, in bytes, of the compressed value.
Exceptions
ExceptionCondition
ArgumentNullExceptionbuffer cannot be null.
ArgumentExceptionlength must be a multiple of four.
ArgumentOutOfRangeExceptionoffset must be greater than or equal to zero.
ArgumentOutOfRangeExceptionlength must be greater than or equal to zero.
ArgumentOutOfRangeExceptionlength exceeds buffer array boundaries
See Also