Compress data using ILBM Run Length Encoding. More...
Public Member Functions | |
const Burger::StaticRTTI * | get_StaticRTTI (void) const noexcept override |
Get the description to the class. | |
CompressILBMRLE (void) | |
Default constructor. | |
eError | Init (void) override |
Reset the RLE compressor. | |
eError | Process (const void *pInput, uintptr_t uInputLength) override |
Compress the input data using RLE. | |
eError | Finalize (void) override |
Finalize RLE compression. | |
Public Member Functions inherited from Burger::Compress | |
Compress (void) | |
Default constructor. | |
virtual | ~Compress () |
Default destructor. | |
OutputMemoryStream * | GetOutput (void) noexcept |
Get the output data. | |
uintptr_t | GetOutputSize (void) const noexcept |
Get the output data size in bytes. | |
uint32_t | GetSignature (void) const noexcept |
Return the signature for this compressor. | |
Public Member Functions inherited from Burger::Base | |
const char * | get_class_name (void) const noexcept |
Get the name of the class. | |
virtual | ~Base () noexcept=default |
Destructor. | |
Static Public Attributes | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
static const uint32_t | Signature = 0x524C4420 |
'RLE ' | |
Static Public Attributes inherited from Burger::Compress | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Static Public Attributes inherited from Burger::Base | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Protected Member Functions | |
eError | Compact (const uint8_t *pInput, uintptr_t uInputLength) |
Compress the input data using RLE. | |
Protected Attributes | |
uintptr_t | m_uCacheUsed |
Number of bytes in the cache. | |
uintptr_t | m_uRemaining |
Number of bytes unprocessed from the last call to Compact() | |
uint8_t | m_Cache [128+8] |
Data cache for resuming compression. | |
Protected Attributes inherited from Burger::Compress | |
OutputMemoryStream | m_Output |
Main output buffer for compressed data. | |
uint32_t | m_uSignature |
4 character code to identify this compressor | |
Compress data using ILBM Run Length Encoding.
This simple format encodes a data stream by finding runs of duplicated data and encodes the duplicates into a count/byte pair. Otherwise, it's a count followed by a stream of raw data.
The format is as follows, a byte is taken which is either above 128 or less than 128. If higher than 128, it's a repeater, if less than 128, it's a count.
128 is considered a "No Operation" or end of line for the data stream. As such, 128 is not allowed to be encoded.
Burger::CompressILBMRLE::CompressILBMRLE | ( | void | ) |
Default constructor.
Initializes the cache buffer.
|
protected |
Compress the input data using RLE.
Compresses the data using RLE and stores the compressed data into an OutputMemoryStream. If there is any excess data, record the size in CompressILBMRLE::m_uRemaining
|
overridevirtual |
Finalize RLE compression.
If any data has been cached from the compression stream, flush it into the output
Implements Burger::Compress.
|
overridevirtualnoexcept |
Get the description to the class.
This virtual function will pull the pointer to the StaticRTTI instance that has the name of the class. Due to it being virtual, it will be the name of the most derived class.
Reimplemented from Burger::Compress.
|
overridevirtual |
|
overridevirtual |
Compress the input data using RLE.
Compresses the data using RLE and stores the compressed data into an OutputMemoryStream
Implements Burger::Compress.
|
static |
The global description of the class.
This record contains the name of this class and a reference to the parent
|
protected |
Data cache for resuming compression.
|
protected |
Number of bytes in the cache.
|
protected |
Number of bytes unprocessed from the last call to Compact()
|
static |
'RLE '