Independent MoonBit implementation of liblzma core functionality
import {
"aurora0x27/lzma-mbt" @lzma,
}
let src = b"hello"
let compressed = @lzma.encode(src[:])
let roundtrip = @lzma.decode(compressed[:])let dec = @lzma.Decoder::new()
dec.write(chunk0[:])
dec.write(chunk1[:])
let roundtrip = dec.finish()let enc = @lzma.encode(src[:], options={
..@lzma.EncodeOptions::default(),
format: @lzma.Format::Lzma,
})moon check --deny-warn
moon fmt --check
moon test --deny-warn
python3 scripts/diff_encode.pypub(all) struct DecodeOptions {
format : Format
memlimit : UInt64?
concatenated : Bool
ignore_check : Bool
filters : Array[FilterSpec]
} derive(Eq, Debug)type Decodertype Encoderlet DEFAULT_MEMLIMIT : UInt64Install
Download zipIndependent MoonBit implementation of liblzma core functionality