[{"data":1,"prerenderedAt":316},["ShallowReactive",2],{"navigation":3,"-spec":118,"-spec-surround":313},[4,38],{"title":5,"path":6,"stem":7,"children":8,"icon":37},"Guide","\u002Fguide","1.guide\u002F0.index",[9,12,17,22,27,32],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","lucide:sparkles",{"title":13,"path":14,"stem":15,"icon":16},"Quick Start","\u002Fguide\u002Fquick-start","1.guide\u002F1.quick-start","lucide:rocket",{"title":18,"path":19,"stem":20,"icon":21},"The Filesystem API","\u002Fguide\u002Fapi","1.guide\u002F2.api","lucide:folder-tree",{"title":23,"path":24,"stem":25,"icon":26},"Performance","\u002Fguide\u002Fperf","1.guide\u002F3.perf","lucide:gauge",{"title":28,"path":29,"stem":30,"icon":31},"Packs & Sync","\u002Fguide\u002Fpacks-and-sync","1.guide\u002F4.packs-and-sync","lucide:package",{"title":33,"path":34,"stem":35,"icon":36},"Under the Hood","\u002Fguide\u002Finternals","1.guide\u002F5.internals","lucide:layers","lucide:book-open",{"title":39,"path":40,"stem":41,"children":42,"icon":117},"Specification","\u002Fspec","2.spec\u002F0.index",[43,45,49,53,57,61,65,69,73,77,81,85,89,93,97,101,105,109,113],{"title":44,"path":40,"stem":41},"Intro",{"title":46,"path":47,"stem":48},"Conventions and Terminology","\u002Fspec\u002Fconventions-and-terminology","2.spec\u002F02.conventions-and-terminology",{"title":50,"path":51,"stem":52},"Primitives","\u002Fspec\u002Fprimitives","2.spec\u002F03.primitives",{"title":54,"path":55,"stem":56},"Refs","\u002Fspec\u002Frefs","2.spec\u002F04.refs",{"title":58,"path":59,"stem":60},"Canonical CBOR","\u002Fspec\u002Fcanonical-cbor","2.spec\u002F05.canonical-cbor",{"title":62,"path":63,"stem":64},"Nodes","\u002Fspec\u002Fnodes","2.spec\u002F06.nodes",{"title":66,"path":67,"stem":68},"Entries","\u002Fspec\u002Fentries","2.spec\u002F07.entries",{"title":70,"path":71,"stem":72},"Directories and paging","\u002Fspec\u002Fdirectories-and-paging","2.spec\u002F08.directories-and-paging",{"title":74,"path":75,"stem":76},"File content","\u002Fspec\u002Ffile-content","2.spec\u002F09.file-content",{"title":78,"path":79,"stem":80},"Store layout (key–value mapping)","\u002Fspec\u002Fstore-layout","2.spec\u002F10.store-layout",{"title":82,"path":83,"stem":84},"Path semantics","\u002Fspec\u002Fpath-semantics","2.spec\u002F11.path-semantics",{"title":86,"path":87,"stem":88},"Pack interchange format (CAR)","\u002Fspec\u002Fpack-format","2.spec\u002F12.pack-format",{"title":90,"path":91,"stem":92},"Conformance","\u002Fspec\u002Fconformance","2.spec\u002F13.conformance",{"title":94,"path":95,"stem":96},"Parameters","\u002Fspec\u002Fparameters","2.spec\u002F14.parameters",{"title":98,"path":99,"stem":100},"Operational considerations","\u002Fspec\u002Foperational-considerations","2.spec\u002F15.operational-considerations",{"title":102,"path":103,"stem":104},"Security considerations","\u002Fspec\u002Fsecurity-considerations","2.spec\u002F16.security-considerations",{"title":106,"path":107,"stem":108},"Store synchronization protocol","\u002Fspec\u002Fsync-protocol","2.spec\u002F17.sync-protocol",{"title":110,"path":111,"stem":112},"Design rationale","\u002Fspec\u002Fdesign-rationale","2.spec\u002F90.design-rationale",{"title":114,"path":115,"stem":116},"Test vectors","\u002Fspec\u002Ftest-vectors","2.spec\u002F91.test-vectors","lucide:scroll-text",{"id":119,"title":120,"body":121,"description":297,"extension":308,"meta":309,"navigation":310,"path":40,"seo":311,"stem":41,"__hash__":312},"content\u002F2.spec\u002F0.index.md","unfs: A Content-Addressed Filesystem Data Format",{"type":122,"value":123,"toc":296},"minimark",[124,131,136,152,155,163,167,172,175,191,195,207,210,245,249,252,256,279,283,289,292],[125,126,127],"p",{},[128,129,130],"strong",{},"Version 0 — Working Draft",[132,133,135],"h2",{"id":134},"abstract","Abstract",[125,137,138,139,142,143,147,148,151],{},"This document specifies ",[128,140,141],{},"unfs",", a data format for storing\nfilesystem trees — files, directories, symlinks, devices, and their unix\nmetadata (the recorded field set of ",[144,145,146],"a",{"href":67},"§7",") — as an immutable, content-addressed graph of blocks in any\nkey–value store, together with a byte-stream interchange format (\"packs\" —\na deterministic profile of the IPLD CARv1 archive format, ",[144,149,150],{"href":87},"§12",") for\nmoving such graphs between stores.",[125,153,154],{},"The format uses a single codec — a strict subset profile of IPLD DAG-CBOR,\nso every block is readable and link-traversable, and every pack readable\nand transportable, by generic IPLD tooling —\na single configurable hash function per store, and stores all recorded unix\nmetadata inline in directory entries. It is fully deterministic: the same logical content\nproduced with the same parameters yields byte-identical blocks and identical\nreferences, regardless of how input was sliced, buffered, or ordered.",[125,156,157,158,162],{},"This specification is self-contained. An implementation can be written from\nthis document and validated against the test vectors in ",[144,159,161],{"href":160},"appendix-a-test-vectors","Appendix A"," without\nreference to any existing implementation.",[132,164,166],{"id":165},"_1-introduction","1. Introduction",[168,169,171],"h3",{"id":170},"_11-data-model-at-a-glance","1.1 Data model at a glance",[125,173,174],{},"A store contains exactly two kinds of things:",[176,177,178,185],"ul",{},[179,180,181,184],"li",{},[128,182,183],{},"Blocks"," — immutable byte strings addressed by their hash. Blocks form a\ndirected acyclic graph (DAG).",[179,186,187,190],{},[128,188,189],{},"Named refs"," — mutable pointers binding a human-readable name to a block\nreference. Names are the only roots of the graph.",[192,193],"mermaid",{"code":194},"graph LR\n  subgraph names[\"names (mutable)\"]\n    main[\"refs:heads:main\"]\n    backup[\"refs:backup\"]\n  end\n  subgraph blocks[\"blocks (immutable, hash-addressed)\"]\n    root[\"&quot;r&quot; root\"]\n    entry[\"Entry {t:&quot;d&quot;, r}\"]\n    dir[\"&quot;d&quot; dir\"]\n    readme[\"&quot;README.md&quot; {t:&quot;f&quot;, sz,m,mt,uid,gid, d}\u003Cbr\u002F>inline bytes, no block\"]\n    big[\"&quot;big.bin&quot; {t:&quot;f&quot;, sz, r}\"]\n    link[\"&quot;link&quot; {t:&quot;l&quot;, tgt}\"]\n    sub[\"&quot;sub&quot; {t:&quot;d&quot;, r}\"]\n    subdir[\"&quot;d&quot; dir\"]\n    fnode[\"&quot;f&quot; file node\u003Cbr\u002F>c: [[sz,r-raw],[sz,r-raw], …]\"]\n    chunk1[\"raw chunk\"]\n    chunk2[\"raw chunk\"]\n  end\n  main -->|n| root\n  backup -->|n| dir\n  root -->|e| entry\n  entry -->|n| dir\n  dir --> readme\n  dir --> big\n  dir --> link\n  dir --> sub\n  sub -->|n| subdir\n  big -->|n| fnode\n  fnode -->|r| chunk1\n  fnode -->|r| chunk2\n",[125,196,197,198,202,203,206],{},"Edge labels: ",[199,200,201],"code",{},"n"," = dag-cbor (node) CID link, ",[199,204,205],{},"r"," = raw CID link.",[125,208,209],{},"Three properties fall out of this shape and drive the rest of the\nspecification:",[176,211,212,221,235],{},[179,213,214,217,218,220],{},[128,215,216],{},"Metadata lives in the parent's entry, not the child's block"," (",[144,219,146],{"href":67},").\nChanging a file's mode rewrites the directory that names it; the content\nblocks are untouched. Two files with identical bytes but different\nmodes\u002Fowners share one content block.",[179,222,223,226,227,230,231,234],{},[128,224,225],{},"Every edit rewrites only the spine"," from the root to the changed entry\n(",[144,228,229],{"href":71},"§8",", ",[144,232,233],{"href":83},"§11","). Every untouched subtree carries over by reference. Old roots\nremain valid and readable — snapshots are free.",[179,236,237,240,241,244],{},[128,238,239],{},"A block is stored and deduplicated by its multihash alone, while\ntraversal identity is the full CID"," — content codec + multihash\n(",[144,242,243],{"href":55},"§4","). This single asymmetry must be respected by every\ndeduplication set in a conforming implementation.",[168,246,248],{"id":247},"_12-design-goals","1.2 Design goals",[125,250,251],{},"In priority order: unix fidelity, small size, performance, simplicity.",[168,253,255],{"id":254},"_13-roles-and-trust-model","1.3 Roles and trust model",[125,257,258,259,262,263,266,267,270,271,274,275,278],{},"This specification distinguishes ",[128,260,261],{},"writers"," (produce blocks, refs, and\npacks) and ",[128,264,265],{},"readers"," (consume them). Writers within one store are assumed\ncooperative (trusted to emit only conforming blocks); they need not be\nexclusive — the concurrency properties of each operation are given in ",[144,268,269],{"href":99},"§15.3",",\nand only garbage collection requires exclusive access (",[144,272,273],{"href":99},"§15.2","). Readers MUST\ntreat all input — blocks fetched from a store, pack bytes, ref values — as\npotentially foreign or hostile, and MUST enforce every validation rule in\nthis document (",[144,276,277],{"href":91},"§13.2",").",[168,280,282],{"id":281},"_14-scope-and-non-goals","1.4 Scope and non-goals",[125,284,285,286,288],{},"In scope: block encodings, the entry\u002Fnode data model, chunking algorithms,\nthe key–value storage mapping, the pack interchange format (a CARv1\nprofile, ",[144,287,150],{"href":87},"), and conformance requirements for readers and writers.",[125,290,291],{},"Out of scope: transport protocols, access control, encryption,\nmulti-writer coordination, and any particular host-language API.",[293,294,295],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":297,"searchDepth":298,"depth":298,"links":299},"",2,[300,301],{"id":134,"depth":298,"text":135},{"id":165,"depth":298,"text":166,"children":302},[303,305,306,307],{"id":170,"depth":304,"text":171},3,{"id":247,"depth":304,"text":248},{"id":254,"depth":304,"text":255},{"id":281,"depth":304,"text":282},"md",{},{"title":44},{"title":120,"description":297},"zM_OSlgcO4uNmqi02NxshgVRt0I87DQHSyRau6AJo-4",[314,315],{"title":33,"path":34,"stem":35,"description":297,"icon":36,"children":-1},{"title":46,"path":47,"stem":48,"description":297,"children":-1},1784656164396]