Something went wrong. Try again.
DASL — Data-Addressed Structures & Links — is a small set of simple, standard primitives for working with content-addressed, linked data. If
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>STAR — STreaming ARchives</title> <meta name="short-name" content="STAR"> <meta name="authors" content="fig"> </head> <body> <div id="abstract"> <p> STAR serializes key-value data pairs into a flat stream, with header metadata. Application profiles can define additional data validations and restrictions. </p> </div> <section> <h2>Introduction</h2> <p> The STAR format (STreaming ARchive) stores sequences of key-value data pairs. The format is simple and flexible: a single required <code>$type</code> key in the header metadata lets applications associate additional data restrictions and validations for their own use-cases. </p> <p> Compared to CAR ([[car]]): STAR is not content addressed and has no format-level CIDs ([[cid]]), contains data pairs instead of individual blocks, and makes the order of pairs explicitly significant. STAR can losslessly encode any CAR with less than one byte per block overhead, see Application Profiles below for an example. </p> </section> <section> <h2>Format</h2> <p> A STAR file begins with four magic bytes, followed by a length-prefixed metadata map with a <code>$type</code> key, and then zero or more data pairs. Each pair consists of two length-prefixed byte sequences, "key" and "value". </p> <pre><code>|------ header ------| |-------------------- data pairs --------------------|[ magic | len | meta ] [ len | key | len | val ] [ len | key | len | val ] …</code></pre>
<h3>Magic</h3> <p> The magic bytes are <code>0x2A 0x6C 0x01 0x00</code>: ascii <code><strong>*l</strong></code> ("star lite"), a fixed version <strong>1</strong>, and a null byte to make four. STAR's magic bytes are always distinct from the first bytes of a CAR ([[car]]) file. </p>
<h3>Length-prefixing</h3> <p> All length prefixes in STAR are encoded as unsigned variable-length integers ([[varint]]). The integer specifies the number of following bytes to read, not including the integer itself. Length prefixes must not contain superfluous trailing <code>0x00</code> bytes: the only number that can end in <code>0x00</code> is <code>0</code>. </p>
<h3>Metadata</h3> <p> The header metadata must be a DRISL-encoded ([[drisl]]) map with the exact size of its length prefix. The map's only reserved and required key is <code>"$type"</code>, whose value must be a string. The meaning of <code>$type</code> is described below under Application Profiles. Arbitrary DRISL metadata can be included at other keys in the map. </p>
<h3>Data pairs</h3> <p> Keys and values are both length-prefixed sequences of zero or more bytes. Exactly one key and one value must be present in each data pair. Duplicate keys and empty keys and values are permitted, but may be restricted by an Application Profile. Pairs are ordered: serializers and parsers must emit data pairs in the exact order they are provided/encoded. </p>
</section> <section> <h2>Additional considerations</h2> <p> Any parser error must be treated as fatal for the entire archive. </p> <p> There is no data-pair-level integrity verification in STAR, and early truncation at a data pair boundary cannot be detected by parsers. See Application Profiles below for use-cases that require these properties. </p> <p> STAR encoding is deterministic where data pair contents and ordering is deterministic. </p> <p> Like CAR ([[car]]), no format-level size limits are defined for header metadata or data-pair keys and values. However, parsers may impose reasonable maximums and are encouraged to provide configurable lower limits. </p> </section>
<section> <h2>Application profiles</h2> <p> TODO </p> </section>
<section> <h2>Not stable yet!</h2> <p> STAR is a new format, and while it has applications <a href="github.com/bluesky-social/proposals/pull/114" target="_blank" rel="noopener">headed for production <em>soon</em>,</a> be prepared for breaking spec changes while its DASL <a href="/governance.html">maturity</a> remains <em>Hot New Stuff</em>. Additional backgound, resources, and open questions: </p> <ul> <li><p> <a href="https://tangled.org/microcosm.blue/star/tree/main/v0-star/star-lite" target="_blank">STAR-lite</a>, an earlier version of this format specifically for atproto public data repository exports. It is not part of the atproto specs but is actively used on the network, to be superseded by STAR. </p></li> <li><p> <a href="https://bsky.app/profile/bad-example.com/post/3mwc5n4f4gk24" target="_blank">Initial public STAR feedback</a> of the first attempt to adapt STAR-lite for atproto spaces, leading to its current flexible shape. </p></li> <li><p> <a href="https://tangled.org/dasl.ing/dasl.ing/issues/21" target="_blank">Proposal for STAR</a>, tangled issue introducing STAR to DASL. </p></li> <li><p> <a href="https://docs.google.com/presentation/d/14awrvqCJCn_FZPF0gW-9ybc2kWdPfO2RDYCet0vOWWU/" target="_blank">Presentation slides</a> introducing STAR at the October 2026 CID Congress. </p></li> <li><p> <a href="https://tangled.org/microcosm.blue/star/tree/interop/interop" target="_blank">Interop test vectors</a> for implementors. </p></li> <li><p> <em>Soon: a link to a summary of questions still to be settled, when that exists.</em> </p></li> </ul> </section>
<section> <h2>Appendix: Media Type</h2> <p> The media type for STAR is TBD! Maybe <code>application/vnd.dasl.star</code>? When is the right time to seek an iana assignment? </p> <p> The conventional file extension for STAR is <code>.star</code>. </p> </section> </body></html>