ProtoRune. CAR
(proto_rune v0.5.1)
Copy Markdown
Reader for CAR (Content Addressable aRchive) v1 data.
Commit events delivered by the ATProto firehose carry their repository
blocks as a CAR byte string in the blocks field. A CAR is a sequence of
varint-length-prefixed segments: a CBOR header with the root CIDs, followed
by entries pairing a binary CID with its block data.
Summary
Functions
Parses CAR data, returning its roots and blocks.
Types
@type t() :: %{roots: [ProtoRune.CID.t()], blocks: [{ProtoRune.CID.t(), binary()}]}
A parsed CAR: the root CIDs and the ordered CID/block entries.
Functions
Parses CAR data, returning its roots and blocks.
Blocks are returned as {cid, block_bytes} tuples in archive order; the
block bytes are the raw DAG-CBOR data, decodable with ProtoRune.CBOR.