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 15
15
- [ Multicodec table] ( #multicodec-table )
16
16
- [ Adding new multicodecs to the table] ( #adding-new-multicodecs-to-the-table )
17
17
- [ Implementations] ( #implementations )
18
+ - [ Reserved Code Ranges] ( #reserved-code-ranges )
18
19
- [ FAQ] ( #faq )
19
20
- [ Contribute] ( #contribute )
20
21
- [ License] ( #license )
@@ -62,6 +63,16 @@ The `validate.py` script can be used to validate the table once it's edited.
62
63
- [ Ruby] ( https://github.com/sleeplessbyte/ruby-multicodec )
63
64
- [ Add yours today!] ( https://github.com/multiformats/multicodec/edit/master/table.csv )
64
65
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
+
65
76
## FAQ
66
77
67
78
> Why varints?
Original file line number Diff line number Diff line change @@ -72,6 +72,12 @@ class CheckError(Exception):
72
72
)
73
73
else :
74
74
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
+ )
75
81
except CheckError as e :
76
82
success = False
77
83
print (f"row { line } : { e } " , file = sys .stderr )
You can’t perform that action at this time.
0 commit comments