29#include <sptk5/Buffer.h>
41 size_t m_readOffset {0};
48 if (m_readOffset >=
bytes() * 3 / 4) {
49 erase(0, m_readOffset);
66 return read((uint8_t*) &
data,
sizeof(T));
99 return data() + m_readOffset;
size_t length() const
Definition: BufferStorage.h:204
void erase(size_t offset, size_t length)
size_t bytes() const
Definition: BufferStorage.h:213
uint8_t * data()
Definition: BufferStorage.h:106
Buffer(const String &str)
Definition: ReadBuffer.h:40
size_t readOffset() const
Definition: ReadBuffer.h:123
bool eof() const
Definition: ReadBuffer.h:114
bool read(Buffer &data, size_t length)
bool read(T &data)
Definition: ReadBuffer.h:64
size_t available() const
Definition: ReadBuffer.h:106
bool read(String &data, size_t length)
bool read(uint8_t *data, size_t size)
uint8_t * head()
Definition: ReadBuffer.h:97