ipfs-chromium
Classes | Public Member Functions | List of all members
ipfs::Car Class Reference

#include <library/src/ipfs_client/car.h>

Classes

struct  Block
 

Public Member Functions

 Car (ByteView bytes, ctx::CborParser &cbor_parser)
 
std::optional< BlockNextBlock ()
 

Detailed Description

A (C)ontent-addressed (A)(r)chive Archive in the same sense as tape archive (.tar), Java archive (.jar), archive (.a) etc. However contains metadata not related to a filesystem, but to an IPLD DAG (or part of one)

Constructor & Destructor Documentation

◆ Car()

ipfs::Car::Car ( ByteView  bytes,
ctx::CborParser cbor_parser 
)

Parse a CAR file

Parameters
bytesThe serialized form of the CAR
cbor_parserA parser for the embedded cbor

Member Function Documentation

◆ NextBlock()

std::optional<Block> ipfs::Car::NextBlock ( )

Pop the next block of the archive

Returns
The block, or nullopt if there are no more

The documentation for this class was generated from the following file: