LzmaCompressor.compress

ubyte[] compress(const(ubyte)[] data)

Compresses the given data into a self-contained .xz stream.

The compressor is reset before each call so every compress call produces an independent .xz frame.

Parameters

dataThe data to compress.

Returns

The compressed data as a new buffer.

Throws

LzmaException if compression fails.