iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
iceberg::puffin::PuffinReader Class Reference

Reader for Puffin files. More...

#include <puffin_reader.h>

Public Member Functions

Result< FileMetadataReadFileMetadata ()
 Read and return the file metadata from the footer.
 
Result< std::pair< BlobMetadata, std::vector< std::byte > > > ReadBlob (const BlobMetadata &blob_metadata)
 Read a specific blob's data by its metadata.
 
Result< std::vector< std::pair< BlobMetadata, std::vector< std::byte > > > > ReadAll (const std::vector< BlobMetadata > &blobs)
 Read all blobs described in the file metadata.
 
Status Close ()
 Close the underlying input stream.
 

Static Public Member Functions

static Result< std::unique_ptr< PuffinReader > > Make (std::unique_ptr< InputFile > input_file, std::optional< int64_t > footer_size=std::nullopt, std::optional< int64_t > file_size=std::nullopt)
 Create a PuffinReader for the given input file.
 

Detailed Description

Reader for Puffin files.

Reads from an InputFile with seek support for efficient blob access.

Member Function Documentation

◆ Make()

Result< std::unique_ptr< PuffinReader > > iceberg::puffin::PuffinReader::Make ( std::unique_ptr< InputFile input_file,
std::optional< int64_t >  footer_size = std::nullopt,
std::optional< int64_t >  file_size = std::nullopt 
)
static

Create a PuffinReader for the given input file.

Parameters
input_fileThe input file to read from.
footer_sizeOptional known footer size hint to avoid an extra seek.
file_sizeOptional known file size hint to avoid fetching size.

◆ ReadAll()

Result< std::vector< std::pair< BlobMetadata, std::vector< std::byte > > > > iceberg::puffin::PuffinReader::ReadAll ( const std::vector< BlobMetadata > &  blobs)

Read all blobs described in the file metadata.

Returns
A vector of (BlobMetadata, decompressed data) pairs, or an error.

◆ ReadBlob()

Result< std::pair< BlobMetadata, std::vector< std::byte > > > iceberg::puffin::PuffinReader::ReadBlob ( const BlobMetadata blob_metadata)

Read a specific blob's data by its metadata.

Parameters
blob_metadataThe metadata describing the blob to read.
Returns
A pair of (BlobMetadata, decompressed data), or an error.

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