1#ifndef BYTEME_CHUNKED_BUFFER_READER_HPP
2#define BYTEME_CHUNKED_BUFFER_READER_HPP
29 my_position = -my_chunk_size;
42 my_position += my_chunk_size;
43 return (my_position < my_length);
46 const unsigned char *
buffer ()
const {
47 return my_buffer + my_position;
51 return std::min(my_chunk_size, my_length - my_position);
55 const unsigned char* my_buffer;
Read chunks of bytes from a raw buffer.
Definition ChunkedBufferReader.hpp:21
ChunkedBufferReader(const char *buffer, size_t length, size_t chunk_size)
Definition ChunkedBufferReader.hpp:37
bool load()
Definition ChunkedBufferReader.hpp:41
size_t available() const
Definition ChunkedBufferReader.hpp:50
ChunkedBufferReader(const unsigned char *buffer, size_t length, size_t chunk_size)
Definition ChunkedBufferReader.hpp:28
const unsigned char * buffer() const
Definition ChunkedBufferReader.hpp:46
Virtual class for reading bytes from a source.
Definition Reader.hpp:15
Simple byte readers and writers.