MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Transitive::Protocol Namespace Reference

Functions

constexpr size_t padded_size (size_t len) noexcept
 Round len up to the next 4-byte boundary.
 
std::vector< uint8_t > read_blob (const uint8_t *data, size_t max_len, size_t &offset)
 Read a length-prefixed blob from a byte buffer.
 
float read_float (const uint8_t *data, size_t &offset)
 Read a big-endian IEEE 754 float from a byte buffer.
 
int32_t read_int32 (const uint8_t *data, size_t &offset)
 Read a big-endian int32 from a byte buffer.
 
std::string read_string (const uint8_t *data, size_t max_len, size_t &offset)
 Read a null-terminated string from a byte buffer.
 
void write_blob (std::vector< uint8_t > &out, const std::vector< uint8_t > &blob)
 Append a length-prefixed blob padded to 4-byte boundary.
 
void write_float (std::vector< uint8_t > &out, float val)
 Append a big-endian IEEE 754 float.
 
void write_int32 (std::vector< uint8_t > &out, int32_t val)
 Append a big-endian int32.
 
void write_string (std::vector< uint8_t > &out, const std::string &str)
 Append a null-terminated string padded to 4-byte boundary.