feat(storage): add binary message record encoding (Go parity)

Add MessageRecord class with Encode/Decode for the binary wire format
used in JetStream file store blocks. Uses varint-encoded lengths,
XxHash64 checksums, and a flags byte for deletion markers.

Go reference: filestore.go:6720-6724, 8180-8250, 8770-8777

13 tests covering round-trip, headers, checksum validation, corruption
detection, varint encoding, deleted flag, empty/large payloads.
This commit is contained in:
Joseph Doherty
2026-02-24 12:12:15 -05:00
parent 2a240c6355
commit 17731e2af5
4 changed files with 436 additions and 0 deletions

View File

@@ -26,6 +26,9 @@
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.4" />
<!-- Hashing -->
<PackageVersion Include="System.IO.Hashing" Version="9.0.4" />
<!-- Compression -->
<PackageVersion Include="IronSnappy" Version="1.3.1" />