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

multipack #14

Open
jbenet opened this issue Jun 15, 2014 · 2 comments
Open

multipack #14

jbenet opened this issue Jun 15, 2014 · 2 comments

Comments

@jbenet
Copy link
Owner

jbenet commented Jun 15, 2014

In the vein of multiaddr and multihash, it's silly that applications usually default to picking one binary encoding. The truth is that applications doing non trivial things will end up with multiple encodings. Hence I propose a self-identifying meta binary encoding. Int prefix identifies the encoding of the following binary blob. We'll just need to keep another table. Luckily, there's so few widely used general formats that I wouldn't expect to hit two bytes this decade :).

Example table:

0x01 protobuf
0x02 capnp
@dominictarr
Copy link

where ever you keep the table would be a point of centralization, mind you.
I have been day dreaming about having a canonical schema, and then identifying a type as the hash of schema. So you could have a (multi)hash at the start of the object,
pointing to the machine readable schema - this way you can dynamically add schemas without maintaining a central list.

@sesam
Copy link

sesam commented Dec 14, 2019

Consider a git repo full of files and .git/blobs/ full of small binary files containing a mix of stuff.
On what level should these 2 bytes file type prefixes be managed? Probably on the file system level, like Mac OS does it.

We humans function best with at least some centralisation (country of residence rather than lawlessness) and a bit of context (language, timezone, locale, ...) and our devices typically share this with us for UX
reasons and compatibility (frequencies for mobile data) reasons. This lookup table with 2 byte prefixes can be shared and hash addressed and I would just use the same lookup table as those whom I communicate with without worrying who put together the table.

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

3 participants