CAR.Decoder (CAR v0.1.0)

View Source

Module for decoding CARv1 files. Spec: https://ipld.io/specs/transport/car/carv1/

Summary

Functions

Extract a CIDv0 or CIDv1 from an arbitrary byte stream.

Types

block_error()

@type block_error() :: {:error, :block, atom()}

header_error()

@type header_error() :: {:error, :header, atom()}

Functions

cid(arg)

@spec cid(binary()) :: {integer(), binary(), binary()}

Extract a CIDv0 or CIDv1 from an arbitrary byte stream.

decode(binary)

@spec decode(binary()) :: {:ok, CAR.Archive.t()} | header_error()