CAR.Archive (CAR v0.1.0)

View Source

Struct representing a decoded CAR file.

Summary

Functions

Get a content block by its CID.

Get all content blocks that are referenced to in roots.

Types

t()

@type t() :: %CAR.Archive{
  blocks: %{required(binary()) => any()},
  roots: [binary()],
  version: integer()
}

Functions

get_block(car, cid)

@spec get_block(t(), binary()) :: any()

Get a content block by its CID.

root_blocks(car)

@spec root_blocks(t()) :: %{required(binary()) => any()}

Get all content blocks that are referenced to in roots.