File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1515- [ Multicodec table] ( #multicodec-table )
1616 - [ Adding new multicodecs to the table] ( #adding-new-multicodecs-to-the-table )
1717- [ Implementations] ( #implementations )
18+ - [ Reserved Code Ranges] ( #reserved-code-ranges )
1819- [ FAQ] ( #faq )
1920- [ Contribute] ( #contribute )
2021- [ License] ( #license )
@@ -62,6 +63,16 @@ The `validate.py` script can be used to validate the table once it's edited.
6263- [ Ruby] ( https://github.com/sleeplessbyte/ruby-multicodec )
6364- [ Add yours today!] ( https://github.com/multiformats/multicodec/edit/master/table.csv )
6465
66+ ## Reserved Code Ranges
67+
68+ The following code ranges have special meaning and may only have meanings assigned to as specified in their description:
69+
70+ ### Private Use Area
71+
72+ * Range* : ` 0x300000 – 0x3FFFFF `
73+
74+ Codes in this range are reserved for internal use by applications and will never be assigned any meaning as part of the Multicodec specification.
75+
6576## FAQ
6677
6778> Why varints?
Original file line number Diff line number Diff line change @@ -72,6 +72,12 @@ class CheckError(Exception):
7272 )
7373 else :
7474 codes [code ] = name
75+
76+ # Reserved Code Range: Private Use Area – Do not permit any codes in this range
77+ if code in range (0x300000 , 0x400000 ):
78+ raise CheckError (
79+ f"found code in Private Use Area: { hex (code )} with name '{ name } '"
80+ )
7581 except CheckError as e :
7682 success = False
7783 print (f"row { line } : { e } " , file = sys .stderr )
You can’t perform that action at this time.
0 commit comments