29#ifndef ACORE_BUFFER_READER_H_
30#define ACORE_BUFFER_READER_H_
60static inline uint8_t ac_buffer_read_nu8(
ac_buffer_t *pBuf)
71static inline uint16_t ac_buffer_read_nu16(
ac_buffer_t *pBuf)
82static inline uint32_t ac_buffer_read_nu24(
ac_buffer_t *pBuf)
93static inline uint32_t ac_buffer_read_nu32(
ac_buffer_t *pBuf)
104static inline uint64_t ac_buffer_read_nu64(
ac_buffer_t *pBuf)
116static inline void ac_buffer_read_n_bytes(
ac_buffer_t *pBuf, uint8_t *data,
size_t size)
const uint8_t * ac_buffer_reader_current_buffer_pointer(ac_buffer_t *pBuf)
Get a pointer to the current position within this buffer's current backing array.
bool ac_buffer_reader_cmp_bytes(const ac_buffer_t *pBuf, const uint8_t *bytes, size_t length)
Compare buffer with array (does not advance read position)
bool ac_buffer_reader_cmp(const ac_buffer_t *pBuf1, const ac_buffer_t *pBuf2)
Compare buffer with array (does not advance read position)
size_t ac_buffer_reader_readable(const ac_buffer_t *pBuf)
Get number of bytes readable from buffer.
void ac_buffer_read_le(ac_buffer_t *pBuf, uint8_t *buf, size_t size)
Read n-bytes in little-endian format from buffer reader and advance read posiion.
void ac_buffer_read_be(ac_buffer_t *pBuf, uint8_t *buf, size_t size)
Read n-bytes in big-endian format from buffer reader and advance read posiion.
void ac_buffer_read_n_skip(ac_buffer_t *pBuf, size_t size)
Skip n bytes from buffer reader and advance read posiion.
size_t ac_buffer_reader_current_buffer_length(ac_buffer_t *pBuf)
Get the number of bytes readable within the current backing array.