feat: add zstd and lz4 compression formats (#3, #4)#128
Open
Chris-Wolfgang wants to merge 6 commits into
Open
Conversation
Closes #3, closes #4. - ZstdCompressionStrategy (ZstdSharp.Port) — .zst single / .tar.zst bundle. - Lz4CompressionStrategy (K4os.Compression.LZ4.Streams) — .lz4 / .tar.lz4. - CompressionFormat enum gains Zstd, Lz4; CompressionStrategyFactory dispatches them. - SharedOptions accepts --format zst|zstd|lz4 (description + error message updated). - Both strategies map the framework CompressionLevel onto the native level scale (Fastest/Optimal/SmallestSize), following the existing GZip/Brotli tar+stream pattern. - Tests: round-trip (single + tar bundle), empty stream, per-level mapping, factory dispatch, and format parsing/build-options. 203 unit + 14 integration pass; new code at 100% coverage; 0 build warnings. - README: formats list (now five), CLI --format values, and architecture section updated (also documents the already-shipped --include/--exclude glob filters). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
7 tasks
…exclude, #12) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds the two new formats to CompressionBenchmarks [Params] + Setup and to the CompressionRatioBenchmarks comparison table, so benchmark/ratio runs cover all five formats (feeds the #5 comparison chart). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Per PR #128 review thread: zstd has no true "store" level (valid range is 1..22), so NoCompression collapses to the same value as Fastest. Comment updated to explain the rationale so the next reader doesn't re-ask. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3, closes #4.
What
Adds Zstandard and LZ4 as compression formats, following the existing strategy pattern.
--formatzstd/zst.zst.tar.zstlz4.lz4.tar.lz4Both are pure-managed and cross-platform. Each maps the framework
CompressionLevel(fastest/optimal/smallest) onto the format's native level scale.Changes
ZstdCompressionStrategy/Lz4CompressionStrategy;CompressionFormatenum + factory +SharedOptionsparsing/validation/help all updated.--formatvalues, architecture section (also documents the already-shipped--include/--excludeglob filters).Acceptance criteria (both issues)
logc compress x.log --format zstd→.zst;--format lz4→.lz4logc bundle ./logs --format zstd→.tar.zst;lz4→.tar.lz4No protected files.