libfly  6.2.2
C++20 utility library for Linux, macOS, and Windows
fly::coders::BinaryDecoder Class Referenceabstract

#include <coder.hpp>

Inheritance diagram for fly::coders::BinaryDecoder:
Collaboration diagram for fly::coders::BinaryDecoder:

Protected Member Functions

bool decode_internal (std::istream &encoded, std::ostream &decoded) final
 
virtual bool decode_binary (fly::BitStreamReader &encoded, std::ostream &decoded)=0
 

Additional Inherited Members

- Public Member Functions inherited from fly::coders::Decoder
virtual ~Decoder ()=default
 
bool decode_string (const std::string &encoded, std::string &decoded)
 
bool decode_file (const std::filesystem::path &encoded, const std::filesystem::path &decoded)
 

Detailed Description

Virtual interface to decode a string or file with a binary decoder. Coders for specific algorithms should inherit from this class to perform decoding.

Author
Timothy Flynn (trfly.nosp@m.nn89.nosp@m.@pm.m.nosp@m.e)
Version
May 3, 2020

Member Function Documentation

◆ decode_binary()

virtual bool fly::coders::BinaryDecoder::decode_binary ( fly::BitStreamReader encoded,
std::ostream &  decoded 
)
protectedpure virtual

Decode a stream.

Parameters
encodedStream holding the contents to decode.
decodedStream to store the decoded contents.
Returns
True if the input stream was successfully decoded.

Implemented in fly::coders::HuffmanDecoder.

◆ decode_internal()

bool fly::coders::BinaryDecoder::decode_internal ( std::istream &  encoded,
std::ostream &  decoded 
)
finalprotectedvirtual

Decode a stream.

Parameters
encodedStream holding the contents to decode.
decodedStream to store the decoded contents.
Returns
bool True if the input stream was successfully decoded.

Implements fly::coders::Decoder.


The documentation for this class was generated from the following files: