Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define binary representation for TypeIDs and implement binary marshaling #5

Open
loreto opened this issue Jul 12, 2023 · 0 comments
Open

Comments

@loreto
Copy link
Contributor

loreto commented Jul 12, 2023

As suggested in #4, typeids could implement the encoding.BinaryMarshaler and encoding.BinaryUnmarshaler interfaces.

To do so, we would first have to define in the spec the standard binary representation for typeids. Options include:

  • Re-use the string representation and encoded in UTF-8
  • Instead of encoding the prefix as the bytes of a base32 string, be more efficient by using the "raw" 128-bit representation of the UUID. A follow up question would be how to distinguish between the prefix and suffix fields in the binary representation (use a separator? include an integer indicating the length of the prefix?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant