.xz data as a new buffer.lzmaCompress
fn
ubyte[] lzmaCompress(const(ubyte)[] data, int level = cast(int) LZMA_PRESET_DEFAULT)One-shot compression of data using LZMA/XZ.
Allocates the output buffer automatically. For repeated compressions, prefer using a LzmaCompressor instance.
Parameters
data | The data to compress. |
level | Compression preset level (0..9, default: LZMA_PRESET_DEFAULT). |
Returns
The compressed
Throws
LzmaException if compression fails.