![]() |
Gamedev Framework (gf) 1.2.0
A C++17 framework for 2D games
|
Compressed output stream. More...
#include <gf/Streams.h>
Public Member Functions | |
CompressedOutputStream (OutputStream &compressed) | |
Constructor. More... | |
~CompressedOutputStream () | |
Destructor. More... | |
std::size_t | write (Span< const uint8_t > buffer) override |
Write data to the stream. More... | |
std::size_t | getWrittenBytesCount () const override |
Get the number of bytes already written. More... | |
![]() | |
OutputStream ()=default | |
Default constructor. More... | |
OutputStream (const OutputStream &)=delete | |
Deleted copy constructor. More... | |
OutputStream & | operator= (const OutputStream &)=delete |
Deleted copy assignment. More... | |
virtual | ~OutputStream () |
Destructor. More... | |
virtual std::size_t | write (Span< const uint8_t > buffer)=0 |
Write data to the stream. More... | |
std::size_t | write (uint8_t byte) |
Write a single byte to the stream. More... | |
virtual std::size_t | getWrittenBytesCount () const =0 |
Get the number of bytes already written. More... | |
Compressed output stream.
|
explicit |
Constructor.
compressed | A stream to store the compressed data |
gf::CompressedOutputStream::~CompressedOutputStream | ( | ) |
Destructor.
|
overridevirtual |
Get the number of bytes already written.
This function returns the number of bytes actually written i.e. it does not take into account possible bytes that have not been flushed yet.
Implements gf::OutputStream.
|
overridevirtual |
Write data to the stream.
buffer | The buffer to copy to the stream |
Implements gf::OutputStream.