Import std.compress.xz
std.compress.xz
The .xz format, over liblzma: LZMA2, in streams with a CRC64 check. Its Compress and Decompress work at once, and its Compressor and Decompressor take bytes in turn and give what came out of them so far, for data that comes in parts. Levels are xz's presets, from 0, the fastest, to 9, the smallest, and are 6 by default, as xz's; the higher ones take much more memory, up to 674 MiB to compress at 9, and 65 MiB to decompress. A Decompress reads streams one after another, and the padding between them, as xz does.
std/compress/xz.fb
Types
XZ
struct
Public Struct XZ
The .xz format's streams.
-
@PanicsAtCaller Public Static Method Compress(data: UInt8[], level: Int = 6): UInt8[]static method #The
data, compressed at thelevel. Panics when thelevelisn't from 0 to 9. -
@PanicsAtCaller Public Static Method Decompress(data: UInt8[], limit: Int = MOST_BYTES): UInt8[] Throws IOErrorstatic method #The bytes the
datais compressed from, each stream's after the last's, or an IOError when it isn't XZ's, ends too soon, or would come to more thanlimitbytes. Panics when thelimitis negative.
XZCompressor
class
Public Class XZCompressor Implements Coder
XZ's bytes made in turn: Add gives what compressing the bytes it takes has made so far, and Finish what's left, which ends a stream, and starts again.
-
Panics when the
levelisn't from 0 to 9. -
What
datacomes to so far, which can be nothing yet.Doc from
std.compress.codec.Coder.Add. -
What's left once all the bytes are added, which ends what it makes, and starts it again.
Doc from
std.compress.codec.Coder.Finish.
XZDecompressor
class
Public Class XZDecompressor Implements Coder
XZ's bytes taken in turn, a stream after another: Add gives what the bytes it takes decompress to so far, and Finish what's left once they've all been added, and starts again. Each throws an IOError when the bytes aren't XZ's or would come to more than the limit, and Finish when they end too soon.
-
Panics when the
limitis negative. -
What
datacomes to so far, which can be nothing yet.Doc from
std.compress.codec.Coder.Add. -
What's left once all the bytes are added, which ends what it makes, and starts it again.
Doc from
std.compress.codec.Coder.Finish.
Report an issue with this page or with FutureBlitz on GitHub.