30#ifndef ACORE_BUFFER_H_
31#define ACORE_BUFFER_H_
64static inline const uint8_t *ac_buffer_data(
const ac_buffer_t *pBuf)
73static inline size_t ac_buffer_size(
const ac_buffer_t *pBuf)
void ac_buffer_split(ac_buffer_t *pStartBuf, ac_buffer_t *pEndBuf, ac_buffer_t *pBuf, size_t length)
Truncate pBuf to length bytes and save the remaining bytes in pEndBuf.
void ac_buffer_append(ac_buffer_t *pBuf, ac_buffer_t *pAppBuf)
Append buffer to end of chain.
void ac_buffer_dup(ac_buffer_t *pBuf, const ac_buffer_t *pBufIn)
Copy pBufIn to pBuf.
void ac_buffer_init(ac_buffer_t *pBuf, const uint8_t *data, size_t size)
Initialize ac_buffer using underlying byte array, set ac_buffer's length to 0 (empty)