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.218-beta+101eee949414e414795e55a6e73d88938f0177b8
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