feat(storage): add zstd replay compression#80
Merged
DriftN2Forty merged 1 commit intoJun 24, 2026
Conversation
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.
Summary
replay.bintimeline payloads and independently compressed chunk payloads.payloadCompression, while retaining magic-byte fallback for legacy manifests.1readable; new chunk payloads write Zstd codec ID2.1.5.0-alpha.12so older alpha builds reject new Zstd archives before attempting LZ4 decode.Benchmark Context
Benchmarks were run with
/replay debug compressionagainst existing LZ4 archives using 3 runs and 1 warmup.Sample
BRAR-2026-06-16-22-16-45:Sample
BRAR-2026-06-17-21-52-51:These results favor Zstd level 1 as the default because it gives substantially smaller timelines and chunk payloads while keeping compression cost acceptable for new saves.
Compatibility
payloadCompression: "zstd".payloadCompressionstill decode by deterministic frame magic detection.04 22 4D 18.28 B5 2F FD.1remainsLZ4_FRAME.2isZSTD..brZIP container layout is unchanged and chunk payloads remain selectively decompressible.Tests
mvn testAdded/updated regression coverage for: