Lz4Compressor.write

void write(const(ubyte)[] data)

Feed more uncompressed data into the compressor.

The current implementation buffers all input written via this method and, upon finish, emits one or more LZ4 blocks created by lz4CompressBlock inside a single LZ4 frame. This provides a simple but valid streaming implementation suitable for both block-oriented use and small-to-medium streams.

Parameters

dataUncompressed input bytes.

Throws

- CompressionError with ErrorCode.CLOSED if called after

finish.

  • CompressionError with ErrorCode.INVALID_INPUT if the

output sink has not been set.