feat(traits): add Gamma, Pair, and ConstCoded bit serde structs#169
Open
feat(traits): add Gamma, Pair, and ConstCoded bit serde structs#169
Conversation
768fc61 to
a86ba38
Compare
- Gamma: encodes/decodes u64 via Elias γ codes - Pair<F, S>: composes two serializers for tuple (A, B) labels - PrefixFree<CODE>: compile-time code selection via ConstCode dispatch
a86ba38 to
d49f179
Compare
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.
Adds new
BitSerializer/BitDeserializerimplementations for graph labels:Gamma— encodes/decodesu64via Elias γ codesPrefixFree<const CODE: usize>— compile-time code selection viaConstCodedispatch (gamma, delta, zeta3, etc.), defaults to gammaZigZag<C>— mapsi64 ↔ u64viaToNat/ToIntbijection, wrapping anyu64-based serializer (e.g.ZigZag(Gamma))Pair<F, S>— composes two serializers to handle tuple(A, B)labels element-wise