lsst.sphgeom g0261d94427+c9b10be330
Functions
codec.h File Reference

This file contains simple helper functions for encoding and decoding primitive types to/from byte strings. More...

#include <vector>

Go to the source code of this file.

Functions

void lsst::sphgeom::encodeDouble (double item, std::vector< uint8_t > &buffer)
 
double lsst::sphgeom::decodeDouble (uint8_t const *buffer)
 
void lsst::sphgeom::encodeU64 (std::uint64_t item, std::vector< uint8_t > &buffer)
 
std::uint64_t lsst::sphgeom::decodeU64 (uint8_t const *buffer)
 

Detailed Description

This file contains simple helper functions for encoding and decoding primitive types to/from byte strings.

Function Documentation

◆ decodeDouble()

double lsst::sphgeom::decodeDouble ( uint8_t const *  buffer)
inline

decodeDouble extracts an IEEE double from the 8 byte little-endian byte sequence in buffer.

◆ decodeU64()

std::uint64_t lsst::sphgeom::decodeU64 ( uint8_t const *  buffer)
inline

decodeU64 extracts an uint64 from the 8 byte little-endian byte sequence in buffer.

◆ encodeDouble()

void lsst::sphgeom::encodeDouble ( double  item,
std::vector< uint8_t > &  buffer 
)
inline

encodeDouble appends an IEEE double in little-endian byte order to the end of buffer.

◆ encodeU64()

void lsst::sphgeom::encodeU64 ( std::uint64_t  item,
std::vector< uint8_t > &  buffer 
)
inline

encodeU64 appends an uint64 in little-endian byte order to the end of buffer.