Tags: go-again/az
Tags
Add DecodeAllLimit and CI pipeline Introduce a bounded decoding method to defend against decompression bombs and implement a comprehensive GitHub Actions CI pipeline. The new `DecodeAllLimit` prevents excessive memory allocation by stopping decompression once the output exceeds a specified threshold. It uses streaming reads for Zstd to ensure the limit is enforced without materializing the entire frame first. The CI pipeline adds: - Multi-platform testing (Ubuntu, macOS, Windows) across multiple Go versions. - Race detection and static analysis (go vet, staticcheck, golangci-lint). - Cross-compilation checks for all supported GOOS/GOARCH targets. - Modernization checks via gopls.
Add pooled Encoder/Decoder and agent documentation Introduce poolable `Encoder` and `Decoder` for high-throughput usage, reducing allocation churn by reusing internal lz4/zstd codecs. Added `AGENTS.md` for library developers and `skills/` for library consumers.
Replace custom LZ77+entropy engine with LZ4 and Zstandard The custom LZ77/Huffman/FSE implementation is replaced with vendored LZ4 (levels 1–2) and Zstandard (levels 3–5) algorithms copied from github.com/pierrec/lz4/v4 and github.com/klauspost/compress. No external imports are added; all algorithm code lives under internal/. Level mapping: -1 lz4 fast (hash-only, ~550 MB/s on text) -2 lz4 HC depth 1024 (~290 MB/s) -3 zstd SpeedDefault / level 6 (~350 MB/s) -4 zstd SpeedBetterCompression / level 12 (~270 MB/s) -5 zstd SpeedBestCompression / level 18 (~60 MB/s) Wire format changes: levels 1–2 emit native LZ4 frames (magic 0x184D2204), levels 3–5 emit native Zstandard frames (magic 0xFD2FB528). The Reader auto-detects format from magic bytes, so tar and standard lz4/zstd tools can decompress .az files directly. The public API (Compress, Decompress, NewWriter, NewReader, options) is unchanged. Module renamed to github.com/go-again/az.