Skip to content

refactor!: ASAPv1 as the only serialization — remove asapmsgpack and gob - #96

Open
GordonYuanyc wants to merge 5 commits into
asapv1-only/hydrafrom
asapv1-only/go-cleanup
Open

GordonYuanyc wants to merge 5 commits into
asapv1-only/hydrafrom
asapv1-only/go-cleanup

Conversation

@GordonYuanyc

Copy link
Copy Markdown
Collaborator

Stacked on #95 (asapv1-only/hydra). Final PR of the sketchlib-go ASAPv1-only series: removes the last non-ASAPv1 serialization. With the stack (#85 → #86–#93 via the integration branch → #94 → #95 → this) ASAPv1 is the only format in sketchlib-go; proto/ and the protobuf harness were already removed in #95.

Removed

  • wire/asapmsgpack/ (encoder, decoder, cell-delta; no importers left).
  • The gob format: common.EncodeToBytes / DecodeFromBytes and every SerializeToBytes / Deserialize*FromBytes on KLL, HLL (three types), Count-Min, Count Sketch, FoldCountMinSketch, FoldCountSketch and Vector2D; SpaceSaving's GobEncode / GobDecode; the helpers only the gob decoders used.
  • Vector1D's JSON codec (only its own test used it).
  • Stale .gitignore lines for the deleted cross-language harness.

Docs

README gains a short "Serialization" section: ASAPv1 via wire/asapv1 and per-sketch MarshalASAPv1 / UnmarshalASAPv1, the spec in asap_sketchlib, and the golden repo mounted at asapv1_golden/.

Open question

These Go types now have no serialized form: FoldCountMinSketch, FoldCountSketch (gob was their only format; ASAPv1 kinds 0x1b/0x1c are reserved, not designed), SpaceSaving (its gob stored only k), CountL2HH, ExponentialHistogram, NitroSketch, OctoSketch. Rust already implements SpaceSaving (0x18), CountL2HH (0x19) and ExponentialHistogram / EHSketchList (0x13/0x14); Go codecs for those could follow.

Verification (Go 1.24.9)

go build ./..., go vet ./..., go test ./... (all passing on this run; TestKLL_Reset_SubsequentInserts is a known flake), go mod tidy -diff clean; gofmt -l lists only two files already unformatted on main. Implemented and reviewed by separate agents; review findings are addressed in the last commit. Rebased onto #95's review fixes.

🤖 Generated with Claude Code

GordonYuanyc and others added 5 commits October 2, 2026 04:37
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop common.EncodeToBytes / DecodeFromBytes and every SerializeToBytes / Deserialize*FromBytes method built on them, along with SpaceSaving's GobEncode / GobDecode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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