This documents version 0.1.2. Thesupport record tracks platform verification andexact-version publication evidence separately, including the frozen 0.1.1stored-block encoder.
Compress stdin to a gzip stream, or use -c -n to compress named files whilekeeping the originals:
-d/--decompress decodes, -t/--test checks compressed data without writingdecoded bytes, and -c/--stdout selects stdout. -n/--no-name omits savednames and timestamps. Multiple operands are processed in order; - reads stdin.The encoder uses pure MoonBit LZ matching with a 32 KiB history and3–258 byte matches. It compares complete stored/fixed/dynamic DEFLATE bit costs,including headers and alignment, and can extend an open Huffman block. Input isprocessed in 64 KiB chunks with bounded history, tokens and coding tables.-1 through -9 select search effort, defaulting to -6; --fast aliases -1and --best aliases -9. The last level option wins, including grouped shortoptions. Levels are accepted and ignored when decompressing or testing.Compressed bytes need not match GNU's encoding. All nine levels pass thedirect Native/Wasm GNU roundtrips and selected size limits in theG1 development report.Published MoonX and performance acceptance remain open.
Decompression accepts concatenated members, optional names, comments and extraheader fields, and verifies header CRC, payload CRC and size. Decoded bytesalready written remain visible if a later member or trailer fails. Zero paddingis accepted; trailing garbage produces a warning and status 2 (-q suppressesthe warning). Input and format failures return 1. Both directions stream inputand output in bounded chunks. Decoding uses 64 KiB input/output buffers, a32 KiB history window and bounded Huffman lookup tables; it does not retain thewhole compressed input or decoded output.The G2 development reportrecords byte/error checks, direct timings and memory observations.
Named-file compression requires -cn; named-file decompression requires -cunless only testing. In-place replacement, saved metadata, recursive traversal,listing and force/pass-through modes are rejected. The public Bytes decoderremains an adapter; its caller still holds the supplied bytes.--help and --version describe this command.
Standalone --version prints exactly gzip 0.1.2 followed by onenewline. Standalone --help starts with Usage: gzip, lists bothmetadata options, and ends with a newline. Both write to stdout, leave stdinunread, and exit with status 0. Exact-version publication and verificationremain recorded separately in the support record.