Gamedev Framework (gf)  0.11.0
A C++14 framework for 2D games
Public Member Functions | List of all members
gf::CompressedOutputStream Class Reference

Compressed output stream. More...

#include <gf/Streams.h>

Inheritance diagram for gf::CompressedOutputStream:
Inheritance graph

Public Member Functions

 CompressedOutputStream (OutputStream &compressed)
 Constructor. More...
 ~CompressedOutputStream ()
 Destructor. More...
virtual std::size_t write (ArrayRef< uint8_t > buffer) override
 Write data to the stream. More...
virtual std::size_t getWrittenBytesCount () const override
 Get the number of bytes already written. More...
- Public Member Functions inherited from gf::OutputStream
 OutputStream ()=default
 Default constructor. More...
 OutputStream (const InputStream &)=delete
 Deleted copy constructor. More...
OutputStreamoperator= (const InputStream &)=delete
 Deleted copy assignment. More...
virtual ~OutputStream ()
 Destructor. More...
std::size_t write (uint8_t byte)
 Write a single byte to the stream. More...

Detailed Description

Compressed output stream.

Constructor & Destructor Documentation

◆ CompressedOutputStream()

gf::CompressedOutputStream::CompressedOutputStream ( OutputStream compressed)


compressedA stream to store the compressed data

◆ ~CompressedOutputStream()

gf::CompressedOutputStream::~CompressedOutputStream ( )


Member Function Documentation

◆ getWrittenBytesCount()

virtual std::size_t gf::CompressedOutputStream::getWrittenBytesCount ( ) const

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.

The number of written bytes

Implements gf::OutputStream.

◆ write()

virtual std::size_t gf::CompressedOutputStream::write ( ArrayRef< uint8_t >  buffer)

Write data to the stream.

bufferThe buffer to copy to the stream
The number of bytes actually written

Implements gf::OutputStream.