Dali 3D User Interface Engine
Functions
Dali::TizenPlatform::DataCompression Namespace Reference

Functions

std::size_t GetMaximumRleCompressedSize (const std::size_t inputSize)
 Return the maximum size of a buffer required to hold a number of bytes. More...
 
void EncodeRle (const unsigned char *input, const std::size_t inputLength, unsigned char *output, const std::size_t outputLength, std::size_t &encodedSize)
 RLE Encodes an array of data. More...
 
bool DecodeRle (const unsigned char *input, const std::size_t inputLength, unsigned char *output, const std::size_t outputLength, std::size_t &decodedSize)
 RLE Decodes an array of data. More...
 

Function Documentation

bool Dali::TizenPlatform::DataCompression::DecodeRle ( const unsigned char *  input,
const std::size_t  inputLength,
unsigned char *  output,
const std::size_t  outputLength,
std::size_t &  decodedSize 
)

RLE Decodes an array of data.

Parameters
[in]inputinput data
[in]inputLengthinput data length in bytes
[out]outputoutput data, pre-allocated by caller, allocated using GetMaximumRleCompressedSize()
[in]outputLengthsize of output data in bytes
[out]decodedSizethe number of bytes decoded into outputBuffer

Definition at line 97 of file data-compression.cpp.

References DALI_LOG_ERROR.

void Dali::TizenPlatform::DataCompression::EncodeRle ( const unsigned char *  input,
const std::size_t  inputLength,
unsigned char *  output,
const std::size_t  outputLength,
std::size_t &  encodedSize 
)

RLE Encodes an array of data.

Parameters
inputinput data
inputLengthinput data length in bytes
outputoutput data, pre-allocated by caller
outputLengthsize of the output buffer in bytes
encodedSizenumber of bytes written to outputBuffer

Definition at line 51 of file data-compression.cpp.

References DALI_ASSERT_DEBUG, and GetMaximumRleCompressedSize().

Here is the call graph for this function:

std::size_t Dali::TizenPlatform::DataCompression::GetMaximumRleCompressedSize ( const std::size_t  inputSize)

Return the maximum size of a buffer required to hold a number of bytes.

Required because compressing data, can end up being bigger than the original data.

Returns
maximum buffer size required to compress inputSize

Definition at line 29 of file data-compression.cpp.

Referenced by EncodeRle().

Here is the caller graph for this function:

Dali Docs Home
Read more about Dali