You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<linkrel="stylesheet" href="spec.css"><linkrel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><rect x=%220%22 y=%220%22 width=%22100%22 height=%22100%22 fill=%22%2300ff75%22></rect></svg>"><metaname="twitter:card" content="summary_large_image"><metaname="twitter:title" property="og:title" content="DASL: Big DASL (BDASL)"><metaname="twitter:description" property="og:description" content="BDASL extends DASL CIDs with a new hash type that works better for large files but isn't available by default in browsers, and therefore not an appropriate option in most situations."><metaname="twitter:image" property="og:image" content="https://dasl.ing/bdasl.png"><metaname="twitter:image:alt" content="Very colourful stripes, so colourful it hurts"><metaname="twitter:url" property="og:url" content="https://dasl.ing/"><metaproperty="og:site_name" content="DASL"><metaproperty="og:locale" content="en"><metaname="theme-color" content="#00ff75"></head>
8
-
<body><divclass="nav-back">A specification of the <ahref="/">DASL Project</a>.</div><main><header><h1>Big DASL (BDASL)</h1><table><tbody><tr><th>date</th><td>2025-03-17</td></tr><tr><th>editors</th><td><ahref="https://berjon.com/">Robin Berjon</a> <<ahref="mailto:robin@berjon.com">robin@berjon.com</a>><br><ahref="https://bumblefudge.com/">Juan Caballero</a> <<ahref="mailto:bumblefudge@learningproof.xyz">bumblefudge@learningproof.xyz</a>></td></tr><tr><th>issues</th><td><ahref="https://github.com/darobin/dasl.ing/issues">list</a>, <ahref="https://github.com/darobin/dasl.ing/issues/new">new</a></td></tr><tr><th>abstract</th><td><divid="abstract">
8
+
<body><divclass="nav-back">A specification of the <ahref="/">DASL Project</a>.</div><main><header><h1>Big DASL (BDASL)</h1><table><tbody><tr><th>date</th><td>2025-05-05</td></tr><tr><th>editors</th><td><ahref="https://berjon.com/">Robin Berjon</a> <<ahref="mailto:robin@berjon.com">robin@berjon.com</a>><br><ahref="https://bumblefudge.com/">Juan Caballero</a> <<ahref="mailto:bumblefudge@learningproof.xyz">bumblefudge@learningproof.xyz</a>></td></tr><tr><th>issues</th><td><ahref="https://github.com/darobin/dasl.ing/issues">list</a>, <ahref="https://github.com/darobin/dasl.ing/issues/new">new</a></td></tr><tr><th>abstract</th><td><divid="abstract">
9
9
<p>
10
10
BDASL extends DASL CIDs with a new hash type that works better for large files but isn't
11
11
available by default in browsers, and therefore not an appropriate option in most
@@ -39,4 +39,4 @@ <h2>Parsing BDASL CIDs</h2>
39
39
</section>
40
40
41
41
42
-
<section><h2>References</h2><dl><dtid="ref-blake3">[blake3]</dt><dd>J-P. Aumasson, S. Neves, J. O'Connor, Z. Wilcox. <ahref="https://www.ietf.org/archive/id/draft-aumasson-blake3-00.html"><cite>The BLAKE3 Hashing Framework</cite></a>. July 2024. URL: <ahref="https://www.ietf.org/archive/id/draft-aumasson-blake3-00.html">https://www.ietf.org/archive/id/draft-aumasson-blake3-00.html</a></dd><dtid="ref-cid">[cid]</dt><dd>Robin Berjon & Juan Caballero. <ahref="https://dasl.ing/cid.html"><cite>Content IDs (CIDs)</cite></a>. 2025-03-17. URL: <ahref="https://dasl.ing/cid.html">https://dasl.ing/cid.html</a></dd></dl></section></main></body></html>
42
+
<section><h2>References</h2><dl><dtid="ref-blake3">[blake3]</dt><dd>J-P. Aumasson, S. Neves, J. O'Connor, Z. Wilcox. <ahref="https://www.ietf.org/archive/id/draft-aumasson-blake3-00.html"><cite>The BLAKE3 Hashing Framework</cite></a>. July 2024. URL: <ahref="https://www.ietf.org/archive/id/draft-aumasson-blake3-00.html">https://www.ietf.org/archive/id/draft-aumasson-blake3-00.html</a></dd><dtid="ref-cid">[cid]</dt><dd>Robin Berjon & Juan Caballero. <ahref="https://dasl.ing/cid.html"><cite>Content IDs (CIDs)</cite></a>. 2025-05-05. URL: <ahref="https://dasl.ing/cid.html">https://dasl.ing/cid.html</a></dd></dl></section></main></body></html>
<linkrel="stylesheet" href="spec.css"><linkrel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><rect x=%220%22 y=%220%22 width=%22100%22 height=%22100%22 fill=%22%2300ff75%22></rect></svg>"><metaname="twitter:card" content="summary_large_image"><metaname="twitter:title" property="og:title" content="DASL: Content-Addressable aRchives (CAR)"><metaname="twitter:description" property="og:description" content="The CAR format offers a serialized representation of set of content-addressed resources in one single concatenated stream, alongside a header that describes that content."><metaname="twitter:image" property="og:image" content="https://dasl.ing/car.png"><metaname="twitter:image:alt" content="Very colourful stripes, so colourful it hurts"><metaname="twitter:url" property="og:url" content="https://dasl.ing/"><metaproperty="og:site_name" content="DASL"><metaproperty="og:locale" content="en"><metaname="theme-color" content="#00ff75"></head>
8
-
<body><divclass="nav-back">A specification of the <ahref="/">DASL Project</a>.</div><main><header><h1>Content-Addressable aRchives (CAR)</h1><table><tbody><tr><th>date</th><td>2025-03-17</td></tr><tr><th>editors</th><td><ahref="https://berjon.com/">Robin Berjon</a> <<ahref="mailto:robin@berjon.com">robin@berjon.com</a>><br><ahref="https://bumblefudge.com/">Juan Caballero</a> <<ahref="mailto:bumblefudge@learningproof.xyz">bumblefudge@learningproof.xyz</a>></td></tr><tr><th>issues</th><td><ahref="https://github.com/darobin/dasl.ing/issues">list</a>, <ahref="https://github.com/darobin/dasl.ing/issues/new">new</a></td></tr><tr><th>abstract</th><td><divid="abstract">
8
+
<body><divclass="nav-back">A specification of the <ahref="/">DASL Project</a>.</div><main><header><h1>Content-Addressable aRchives (CAR)</h1><table><tbody><tr><th>date</th><td>2025-05-05</td></tr><tr><th>editors</th><td><ahref="https://berjon.com/">Robin Berjon</a> <<ahref="mailto:robin@berjon.com">robin@berjon.com</a>><br><ahref="https://bumblefudge.com/">Juan Caballero</a> <<ahref="mailto:bumblefudge@learningproof.xyz">bumblefudge@learningproof.xyz</a>></td></tr><tr><th>issues</th><td><ahref="https://github.com/darobin/dasl.ing/issues">list</a>, <ahref="https://github.com/darobin/dasl.ing/issues/new">new</a></td></tr><tr><th>abstract</th><td><divid="abstract">
9
9
<p>
10
10
The CAR format offers a serialized representation of set of content-addressed
11
11
resources in one single concatenated stream, alongside a header that describes
@@ -54,7 +54,7 @@ <h2>Parsing CAR</h2>
54
54
</li>
55
55
<li>
56
56
Run the steps to <ahref="#dfn-parse-a-car-header" class="dfn-ref">parse a CAR header</a> with <var>bytes</var> to obtain
57
-
<var>version</var> and <var>roots</var>.
57
+
<var>metadata</var>.
58
58
</li>
59
59
<li>
60
60
Set up array <var>blocks</var> and run these substeps:
@@ -76,21 +76,38 @@ <h2>Parsing CAR</h2>
76
76
</ol>
77
77
</li>
78
78
<li>
79
-
Return <var>version</var>, <var>roots</var>, and <var>blocks</var>.
79
+
Return <var>metadata</var> and <var>blocks</var>.
80
80
</li>
81
81
</ol>
82
82
<p>
83
-
The CAR header encodes both a <code>version</code>, which is always 1, and
84
-
an array of <code>roots</code>, which is a list of CIDs. A CAR can be used
85
-
to contain one or more DAGs of dCBOR42 content and the purpose of the
86
-
<code>roots</code> is to list one or more roots for those DAGs. The array
87
-
may be empty if you do not care about encoding DAGs.
83
+
Note that the CAR header contains a near-arbitrary dCBOR42 object that is to be
84
+
treated as metadata ([<ahref="#ref-dcbor42" class="ref">dcbor42</a>]). For historical reasons, there are two
85
+
constraints on the header:
88
86
</p>
87
+
<ul>
88
+
<li>
89
+
The object MUST contain a <code>version</code> map entry, the value of which
90
+
is always integer-type <code>1</code>. Version numbers is data formats are
91
+
an anti-pattern, and as a result this number is guaranteed never to change.
92
+
</li>
93
+
<li>
94
+
The object MUST contain a <code>roots</code> entry, which MUST be of type
95
+
array. It MAY be empty, but if it isn't then it must be an array of CIDs
96
+
encoded using tag 42 ([<ahref="#ref-cid" class="ref">cid</a>]). A CAR can be used
97
+
to contain one or more DAGs of dCBOR42 content and the purpose of the
98
+
<code>roots</code> is to list one or more roots for those DAGs. The array
99
+
may be empty if you do not care about encoding DAGs. <strong>NOTE</strong>:
100
+
Some implementations expect there to always be at least one root. If you do
101
+
not wish to indicate a root but have to interoperate with those implementations,
102
+
you can always use the empty DASL CID <code>\x01\x55\x12\x00</code> instead.
103
+
</li>
104
+
</ul>
89
105
<p>
90
-
<strong>NOTE</strong>: Some implementations expect there to always be at
91
-
least one root. If you do not wish to indicate a root but have to
92
-
interoperate with those implementations, you can always use the empty
93
-
DASL CID <code>\x01\x55\x12\x00</code> instead.
106
+
Some implementations will only return <var>version</var> and <var>roots</var>,
107
+
but it is RECOMMENDED that they make the entire <var>metadata</var> object
108
+
available. A best practice for authors is to use the <var>metadata</var>
109
+
to capture MASL content, which is able to provide metadata and a pathing
110
+
mapping for the entire content of the CAR stream if needed ([<ahref="#ref-masl" class="ref">masl</a>]).
94
111
</p>
95
112
<p>
96
113
The steps to <dfnid="dfn-parse-a-car-header">parse a CAR header</dfn> are:
@@ -101,22 +118,22 @@ <h2>Parsing CAR</h2>
101
118
<li>If <var>length</var> is 0, throw an error.</li>
102
119
<li>
103
120
Read <var>length</var> bytes from <var>bytes</var> and decode them as
104
-
dCBOR42 ([<ahref="#ref-dcbor42" class="ref">dcbor42</a>]) into <var>object</var>. If <var>object</var> is
121
+
dCBOR42 ([<ahref="#ref-dcbor42" class="ref">dcbor42</a>]) into <var>metadata</var>. If <var>metadata</var> is
105
122
not a map, throw an error.
106
123
</li>
107
124
<li>
108
-
If <var>object</var> does not have a <code>version</code> key entry
125
+
If <var>metadata</var> does not have a <code>version</code> key entry
109
126
with integer value <code>1</code>, throw an error. Otherwise, store
110
127
<code>version</code> in <var>version</var>.
111
128
</li>
112
129
<li>
113
-
If <var>object</var> does not have a <code>roots</code> key entry
130
+
If <var>metadata</var> does not have a <code>roots</code> key entry
114
131
that is an array, or if that array contains anything other than DASL
115
132
CIDs, throw an error. Otherwise, store <code>roots</code> in
116
133
<var>roots</var>.
117
134
</li>
118
135
<li>
119
-
Return <var>version</var> and <var>roots</var>.
136
+
Return <var>metadata</var>.
120
137
</li>
121
138
</ol>
122
139
<p>
@@ -210,4 +227,4 @@ <h2>Appendix: Media Type</h2>
210
227
</section>
211
228
212
229
213
-
<section><h2>References</h2><dl><dtid="ref-cid">[cid]</dt><dd>Robin Berjon & Juan Caballero. <ahref="https://dasl.ing/cid.html"><cite>Content IDs (CIDs)</cite></a>. 2025-03-17. URL: <ahref="https://dasl.ing/cid.html">https://dasl.ing/cid.html</a></dd><dtid="ref-dcbor42">[dcbor42]</dt><dd>Robin Berjon & Juan Caballero. <ahref="https://dasl.ing/dcbor42.html"><cite>Deterministic CBOR with tag 42 (dCBOR42)</cite></a>. 2025-03-17. URL: <ahref="https://dasl.ing/dcbor42.html">https://dasl.ing/dcbor42.html</a></dd><dtid="ref-leb128">[leb128]</dt><dd>Wikipedia. <ahref="https://en.wikipedia.org/wiki/LEB128"><cite>LEB128</cite></a>. Retrieved December 2024. URL: <ahref="https://en.wikipedia.org/wiki/LEB128">https://en.wikipedia.org/wiki/LEB128</a></dd></dl></section></main></body></html>
230
+
<section><h2>References</h2><dl><dtid="ref-cid">[cid]</dt><dd>Robin Berjon & Juan Caballero. <ahref="https://dasl.ing/cid.html"><cite>Content IDs (CIDs)</cite></a>. 2025-05-05. URL: <ahref="https://dasl.ing/cid.html">https://dasl.ing/cid.html</a></dd><dtid="ref-dcbor42">[dcbor42]</dt><dd>Robin Berjon & Juan Caballero. <ahref="https://dasl.ing/dcbor42.html"><cite>Deterministic CBOR with tag 42 (dCBOR42)</cite></a>. 2025-05-05. URL: <ahref="https://dasl.ing/dcbor42.html">https://dasl.ing/dcbor42.html</a></dd><dtid="ref-leb128">[leb128]</dt><dd>Wikipedia. <ahref="https://en.wikipedia.org/wiki/LEB128"><cite>LEB128</cite></a>. Retrieved December 2024. URL: <ahref="https://en.wikipedia.org/wiki/LEB128">https://en.wikipedia.org/wiki/LEB128</a></dd><dtid="ref-masl">[masl]</dt><dd>Robin Berjon & Juan Caballero. <ahref="https://dasl.ing/masl.html"><cite>MASL — Metadata for Arbitrary Structures & Links</cite></a>. 2025-05-05. URL: <ahref="https://dasl.ing/masl.html">https://dasl.ing/masl.html</a></dd></dl></section></main></body></html>
0 commit comments