feat: add native zstd compression plugin and deduplicate shared compression/meta utilities

- Add zstd crate (v0.13) with native Rust compression engine (level 3)
- Gate behind 'zstd' feature flag, fall back to program-based when disabled
- Extract CompressionService::decompressing_reader/compressing_writer with zstd support
- Extract MetaService::with_collector() to eliminate Arc<Mutex<Vec>> boilerplate
- Extract read_with_bounds() helper for skip+read pattern
- Add input validation for mutually exclusive --id and --tags flags
- Add zstd round-trip tests
This commit is contained in:
2026-03-16 20:03:30 -03:00
parent 35ee71c3cf
commit a90c19efc1
19 changed files with 310 additions and 159 deletions

View File

@@ -39,6 +39,7 @@ libc = "0.2"
local-ip-address = "0.6"
log = "0.4"
lz4_flex = { version = "0.12", optional = true }
zstd = { version = "0.13", optional = true }
magic = { version = "0.13", optional = true }
nix = { version = "0.30", features = ["fs", "process"] }
once_cell = "1.21"
@@ -96,7 +97,7 @@ gzip = ["flate2"]
lz4 = ["lz4_flex"]
bzip2 = []
xz = []
zstd = []
zstd = ["dep:zstd"]
# Plugin features (meta and filter)
all-meta-plugins = ["dep:magic"]