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 a codec table format #18

Closed
wanderer opened this issue Oct 13, 2016 · 0 comments
Closed

define a codec table format #18

wanderer opened this issue Oct 13, 2016 · 0 comments

Comments

@wanderer
Copy link
Member

wanderer commented Oct 13, 2016

This is the first attempt creating a format for defining codec tables. Codec tables map single bytes to multiple bytes in this case ascii strings which represent a multicodec prefix.

Table definition

Field Type Description
count varuint32 count of type entries to follow
entries type_entry* repeated type entries as described below

Entry definition

Field Type Description
count varuint32 the length of the string of a multicodec prefix
prefix bytes the prefix string
packed encoding byte The packed encoding of prefix

This is effectively layer 0 compression. Which is a simple binary encoding of the prefix bytes and related data structures. The encoding is dense and trivial to interact with.

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

No branches or pull requests

1 participant