Skip to content

Add experimental zstd lib - #38

Merged
vearutop merged 3 commits into
masterfrom
exp-zstd
Nov 16, 2026
Merged

vearutop merged 3 commits into
masterfrom
exp-zstd

Conversation

@vearutop

@vearutop vearutop commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Switch .zst (de)compression from klauspost/compress and DataDog/zstd to vearutop/zstd-go.

  • Default build uses pure-Go zstd-go; -tags cgo_zstd uses zstd-go/libzstd (cgo, vendored libzstd 1.5.7) instead of DataDog/zstd.
  • Removed the -exp-zstd flag and CATP_EXP_ZSTD env var, zstd-go is now the only implementation.
  • Writer produces 16 MiB frames with a seek table, in both builds.
  • -parallel 0 enables a 2-block pipelined zstd decoder (Reader.Concurrency = 2), faster at the cost of more CPU. No effect in the cgo build.
  • klauspost/compress is now only an indirect dependency (via pgzip), DataDog/zstd is dropped.
  • Fix: progress counter stuck at 0.0% when reading a plain file without -l or other scan options (the scan-only consumed counter was used with the plain copy path).

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 10 2308 (+3) 1726 (-1) 106 (+2) 476 (+2) 486 (-4) 53.6K (+39B)
YAML 7 521 (+1) 471 (+1) 21 29 0 17.1K (+21B)

@github-actions

Copy link
Copy Markdown

Go API Changes

# summary
Inferred base version: v0.3.27
Suggested version: v0.4.0

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Unit Test Coverage

total: (statements) 48.2%
changed lines: (statements) 22.7%, coverage is less than 90.0%, consider testing the changes more thoroughly

Coverage of changed lines
File Function Coverage
Total 22.7%
cmd/catp/catp/app.go 100.0%
cmd/catp/catp/app.go:28 Main 100.0%
cmd/catp/catp/catp.go 28.6%
cmd/catp/catp/catp.go:639 catChunk 71.4%
cmd/catp/catp/catp.go:476 speedJSON 0.0%
cmd/catp/catp/catp.go:512 startControlServer 0.0%
cmd/catp/catp/catp.go:788 openReader 0.0%
cmd/catp/catp/catp.go:805 startProfiling 0.0%
cmd/catp/catp/zstd.go 0.0%
cmd/catp/catp/zstd.go:12 zstdReader 0.0%
cmd/catp/catp/zstd.go:21 zstdWriter 0.0%
cmd/catp/catp/cgo_zstd.go no coverage
Coverage diff with base branch
File Function Base Coverage Current Coverage
Total 48.1% 48.2% (+0.1%)
cmd/catp/catp/catp.go catChunk 87.5% 87.7% (+0.2%)
cmd/catp/catp/catp.go openReader 40.0% 57.1% (+17.1%)

@vearutop
vearutop merged commit b63b4af into master Nov 16, 2026
5 checks passed
@vearutop
vearutop deleted the exp-zstd branch November 16, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant