zstdCompress
fn
ubyte[] zstdCompress(const(ubyte)[] data, int level = ZSTD_CLEVEL_DEFAULT)One-shot compression of data using Zstandard.
Allocates the output buffer automatically. For repeated compressions, prefer using a ZstdCompressor instance.
Parameters
data | The data to compress. |
level | The compression level (default: ZSTD_CLEVEL_DEFAULT). |
Returns
The compressed data as a new buffer.
Throws
ZstdException if compression fails.