HPPR Packet Links and Chunks
Tags: packet, content-convention
© R.A.Sol
This spec defines packet-level content conventions that are independent of any repository service.
+Link Header
Generic form:
+Link: <tag> <hash>
Common tags:
request: this packet replies to that requestsupersedes: this packet replaces older version
Typed links are headers named [Type]+Link. Tools
should scan header names containing +Link.
Hash links form a DAG. Cycles are impossible because packet hash includes all header bytes.
Chunked Content Convention
Large content can be split into chunk blobs with a manifest packet.
Manifest detection:
- has one or more
Chunk+Linkheaders - has
Data-Length: 0
Syntax:
Chunk+Link: <start>..<end> <T>.<hash>.H3
- range is half-open: start inclusive, end exclusive
T=B: raw blob chunkT=P: nested chunk manifest
Required header:
Content-Total-Length: <n>
Optional headers:
Content-TypeContent-Hash-Full: B.<hash>.H3
Validation:
- chunk ranges contiguous
- no overlap
- total span exactly
0..<Content-Total-Length>
Nested manifests use 0-relative ranges in each sub-manifest. Depth limit is 8.
Default chunk size is 32 MiB. Smaller chunks improve random access and increase overhead.