This repository was archived by the owner on Sep 29, 2025. It is now read-only.
[WIP] adding MIME types as codec types#28
Closed
bochaco wants to merge 2 commits intomultiformats:masterfrom
Closed
[WIP] adding MIME types as codec types#28bochaco wants to merge 2 commits intomultiformats:masterfrom
bochaco wants to merge 2 commits intomultiformats:masterfrom
Conversation
Each MIME type is added as a codec which codec name is prefixed with 'mime/', i.e.: mime/<mime-type-here> Based on the information at [1] the following ranges are reserved for any mime types/subtypes: Range 0x1000 - 0x17ff: (11 bits) reserved for 'application/*' (there currently are ~1,300 subtypes) Range 0x1800 - 0x18ff: (8 bits) reserved for 'audio/*' (there currently are ~150 subtypes) Range 0x1900 - 0x190f: (4 bits) reserved for 'font/*' (there currently are ~8 subtypes) Range 0x1910 - 0x197f: (7 bits) reserved for 'image/*' (there currently are ~60 subtypes) Range 0x1980 - 0x19cf: (5 bits) reserved for 'message/*' (there currently are ~18 subtypes) Range 0x19d0 - 0x1a3f: (6 bits) reserved for 'model/*' (there currently are ~24 subtypes) Range 0x1a40 - 0x1a8f: (5 bits) reserved for 'multipart/*' (there currently are ~13 subtypes) Range 0x1a90 - 0x1aff: (7 bits) reserved for 'text/*' (there currently are ~71 subtypes) Range 0x1b00 - 0x1b6f: (7 bits) reserved for 'video/*' (there currently are ~78 subtypes) In this PR only the MIME types listed at [2] are declared since these should be the most relevant for the web, plus a few additional ones useful for the semantic web. [1]: https://www.iana.org/assignments/media-types/media-types.xhtml [2]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types
09b6652 to
e285bb5
Compare
Member
Author
Hi @hacdias , yes, that's what I did in the referenced PR above: multiformats/multicodec#84 |
Member
|
@bochaco closing this as multiformats/multicodec#84 got replaced by multiformats/multicodec#159! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This depends on this other PR to update the table with MIME types as codecs: multiformats/multicodec/pull/84
Each MIME type is added as a codec which codec name is prefixed with 'mime/', i.e.:
Based on the information at 1 the following ranges are reserved for any mime types/subtypes:
In this PR only the MIME types listed at 2 are declared since these should
be the most relevant for the web, plus a few additional ones useful for the semantic web.