Versions in this module Expand all Collapse all v0 v0.0.1 May 14, 2026 Changes in this version + const Code + const ContentType + var MaxAllowedSectionSize uint = 32 << 20 + func Encode(roots []cid.Cid, blocks []Block) io.ReadCloser + func HeaderSize(h datamodel.HeaderModel) (uint64, error) + func Index(reader io.Reader, opts ...IndexerOption) (HeaderIndexEntry, []BlockIndexEntry, error) + func LdRead(r *bufio.Reader) ([]byte, error) + func LdSize(d ...[]byte) uint64 + func LdWrite(w io.Writer, d ...[]byte) error + func ReadBlock(br *bufio.Reader) (cid.Cid, []byte, error) + func ReadHeader(br *bufio.Reader) (datamodel.HeaderModel, error) + func WriteBlock(w io.Writer, block Block) error + func WriteHeader(w io.Writer, roots []cid.Cid) error + type Block struct + Data []byte + Link cid.Cid + func Decode(reader io.Reader, opts ...ReaderOption) ([]cid.Cid, []Block, error) + type BlockIndexEntry struct + End uint64 + Link cid.Cid + Start uint64 + type BlockIndexer struct + Offset uint64 + Reader *bufio.Reader + SkipIntegrityChecks bool + func (bi *BlockIndexer) Read() (BlockIndexEntry, error) + type BlockReader struct + Reader *bufio.Reader + SkipIntegrityChecks bool + func (r *BlockReader) Read() (Block, error) + type HeaderIndexEntry struct + Roots []cid.Cid + Size uint64 + type Indexer struct + Header HeaderIndexEntry + func NewIndexer(r io.Reader, opts ...IndexerOption) (*Indexer, error) + func (r *Indexer) Read() (BlockIndexEntry, error) + type IndexerOption func(*indexerCfg) + func WithIndexerSkipIntegrityChecks() IndexerOption + type Reader struct + Header datamodel.HeaderModel + func NewReader(r io.Reader, opts ...ReaderOption) (*Reader, error) + func (r *Reader) Read() (Block, error) + type ReaderOption func(*readerCfg) + func WithSkipIntegrityChecks() ReaderOption + type Writer struct + func NewWriter(w io.Writer) *Writer + func (e *Writer) WriteBlock(block Block) error + func (e *Writer) WriteHeader(roots []cid.Cid) error