- Add BINARY_FORMAT.md: full AcBinary wire format spec (markers, encoding, options, protocol, interactions) - Reference BINARY_FORMAT.md from GLOSSARY.md, Binaries/README.md, and Serializers/Binaries/README.md; add new glossary terms - Clarify and expand config options tables to match new doc - Add/clarify LLM maintenance rules: always sync .md files with code, auto-fix discrepancies - Update root README.md: AyCode.Core targets .NET 9, not 10; stress doc/code sync - Add code reuse and doc sync conventions to copilot-instructions.md and CONVENTIONS.md - Add docs/ folder and BINARY_FORMAT.md to solution as Solution Items - Minor clarifications and cross-links in ARCHITECTURE.md and other docs |
||
|---|---|---|
| .. | ||
| BrotliHelper.cs | ||
| GzipHelper.cs | ||
| Lz4.cs | ||
| Lz4CompressionMode.cs | ||
| Lz4Compressor.cs | ||
| Lz4Decompressor.cs | ||
| README.md | ||
README.md
Compression
Three compression algorithms with a unified static API. All implementations use ArrayPool<byte> and stackalloc for minimal GC pressure.
Key Files
BrotliHelper.cs— Brotli compress/decompress. Stack-allocates for small inputs, pools for large.IsBrotliCompressed()detection.GzipHelper.cs— GZip compress/decompress. Same API shape as BrotliHelper.IsGzipCompressed()checks magic bytes (0x1F, 0x8B).Lz4.cs— High-level LZ4 facade. Dispatches to Block or BlockArray mode viaLz4CompressionMode.Lz4Compressor.cs— Pure managed LZ4 block compressor. Hash table pattern matching (4K entries, 12-bit hash), MinMatch=4. WASM-compatible (no native dependencies).Lz4Decompressor.cs— LZ4 block/BlockArray decompressor. Handles overlapping copies for match references.Lz4CompressionMode.cs— Enum:None,Block(single),BlockArray(64KB chunked).
LZ4 Modes
| Mode | Use Case |
|---|---|
Block |
Single contiguous block with 4-byte size header |
BlockArray |
Chunked (64KB default) for streaming/large data |
Dependencies
System.IO.Compression(Brotli, GZip)System.Buffers(ArrayPool)