Import std.compress.zstd
Zstd
struct
Public Struct Zstd
Zstd's frames, of .zst files.
Examples
Local data = "again and again and again and again".Repeated(100).Bytes
Local packed = Zstd.Compress(data, 19)
Expect(packed.Count < data.Count)
Local unpacked = Try Zstd.Decompress(packed)
Expect(unpacked == data)-
@PanicsAtCaller Public Static Method Compress(data: UInt8[], level: Int = 3): UInt8[]static method #The
data, compressed at thelevel. Panics when thelevelisn't from 1 to 22. -
@PanicsAtCaller Public Static Method Decompress(data: UInt8[], limit: Int = MOST_BYTES): UInt8[] Throws IOErrorstatic method #The bytes the
datais compressed from, each frame's after the last's, or an IOError when it isn't Zstd's, ends early, or would come to more thanlimitbytes. Panics when thelimitis negative.
Report an issue with this page or with FutureBlitz on GitHub.