1 #ifndef SPONGE_LIBSPONGE_BYTE_STREAM_HH
2 #define SPONGE_LIBSPONGE_BYTE_STREAM_HH
size_t bytes_read() const
Total number of bytes popped.
size_t bytes_written() const
Total number of bytes written.
size_t write(const std::string &data)
bool _error
Flag indicating that the stream suffered an error.
std::string read(const size_t len)
ByteStream(const size_t capacity)
Construct a stream with room for capacity bytes.
void set_error()
Indicate that the stream suffered an error.
size_t remaining_capacity() const
size_t buffer_size() const
void pop_output(const size_t len)
Remove bytes from the buffer.
std::string peek_output(const size_t len) const
void end_input()
Signal that the byte stream has reached its ending.
bool buffer_empty() const