Skip to content

Struct star::IndexEntry

ClassList > star > IndexEntry

Index entry with block compression support and shape information. More...

  • #include <stards.h>

Public Attributes

Type Name
uint64_t block_size
std::vector< BlockInfo > blocks
CompressionAlgorithm compression
DataType datatype
bool dirty
bool is_metadata_block = false
uint64_t position
std::vector< size_t > shape
bool stored_in_metadata = false
uint64_t total_bytes

Public Functions

Type Name
bool is_scalar () const
size_t num_elements () const
void print () const
void read (std::istream & is)
size_t serialized_size () const
void write (std::ostream & os) const

Detailed Description

Note:

On-disk portability: this descriptor and its BlockInfo entries serialize their size_t fields as fixed-width little-endian uint64 values via write_u64 / read_u64 (which use the shift-based write_le/read_le, independent of host width and byte order). So .stards files interchange freely across platforms of any pointer width or endianness, including 32-bit wasm32 (size_t == 4 bytes) — the fields are narrowed to/from size_t with explicit static_casts on read. This matches the documented format-v1 layout.

Public Attributes Documentation

variable block_size

uint64_t star::IndexEntry::block_size;

variable blocks

std::vector<BlockInfo> star::IndexEntry::blocks;

variable compression

CompressionAlgorithm star::IndexEntry::compression;

variable datatype

DataType star::IndexEntry::datatype;

variable dirty

bool star::IndexEntry::dirty;

variable is_metadata_block

bool star::IndexEntry::is_metadata_block;

variable position

uint64_t star::IndexEntry::position;

variable shape

std::vector<size_t> star::IndexEntry::shape;

variable stored_in_metadata

bool star::IndexEntry::stored_in_metadata;

variable total_bytes

uint64_t star::IndexEntry::total_bytes;

Public Functions Documentation

function is_scalar

inline bool star::IndexEntry::is_scalar () const

function num_elements

inline size_t star::IndexEntry::num_elements () const

function print

inline void star::IndexEntry::print () const

function read

inline void star::IndexEntry::read (
    std::istream & is
) 

function serialized_size

inline size_t star::IndexEntry::serialized_size () const

function write

inline void star::IndexEntry::write (
    std::ostream & os
) const


The documentation for this class was generated from the following file StarDS/include/stards.h