|
jaffarCommon
|
#include <differential.hpp>


Public Member Functions | |
| Differential (void *__restrict outputDataBuffer=nullptr, const size_t outputDataBufferSize=std::numeric_limits< uint32_t >::max(), const void *__restrict referenceDataBuffer=nullptr, const size_t referenceDataBufferSize=std::numeric_limits< uint32_t >::max(), const bool useZlib=false) | |
| __JAFFAR_COMMON__INLINE__ void | pushContiguous (const void *const __restrict inputData=nullptr, const size_t inputDataSize=0) override |
| __JAFFAR_COMMON__INLINE__ void | push (const void *const __restrict inputData, const size_t inputDataSize) override |
| size_t | getReferenceDataBufferPos () const |
| size_t | getDifferentialBytesCount () const |
Public Member Functions inherited from jaffarCommon::serializer::Base | |
| Base (void *__restrict outputDataBuffer, const size_t outputDataBufferSize) | |
| __JAFFAR_COMMON__INLINE__ size_t | getOutputSize () const |
| __JAFFAR_COMMON__INLINE__ uint8_t * | getOutputDataBuffer () const |
Additional Inherited Members | |
Protected Attributes inherited from jaffarCommon::serializer::Base | |
| uint8_t *__restrict const | _outputDataBuffer |
| const size_t | _outputDataBufferSize |
| size_t | _outputDataBufferPos = 0 |
The differential serialization class enables the compression of a input elements that, when applied to a reference data buffer, produces the a compressed output. Well used, it produces an output that is smaller than the original data. The original data can be recovered later by comparing the output to the reference data.
The compression can be applied to different elements at different times. It also enables the use of contiguous storage for elements that are not meant to be compressed.
|
inline |
Default constructor for the differntial deserializer class
| [in] | outputDataBuffer | The output buffer onto which to write the serialized data |
| [in] | outputDataBufferSize | The size of the output buffer |
| [in] | referenceDataBuffer | The buffer from whence to read the reference data |
| [in] | referenceDataBufferSize | The size of the reference buffer |
| [in] | useZlib | Specifies whether to apply Zlib compression after the differential compression |
|
inline |
Gets the number of differential bytes included in the serialized output
This is useful to make sure the differential part of the serialization is not exceeded
|
inline |
Get the position of the reference buffer header.
|
inlineoverridevirtual |
Serializes the specified number of bytes onto the output data buffer, pushing the information from the input data buffer
| [out] | inputDataBuffer | The contiguous output buffer from which data is serialized. Passing nullptr is allowed and can be used to determine the required output buffer size |
| [in] | inputDataSize | The number of bytes from the input data buffer to serialize |
Implements jaffarCommon::serializer::Base.
|
inlineoverridevirtual |
Serializes the specified number of contiguous bytes onto the output data buffer, pushing the information from the input buffer
| [out] | inputDataBuffer | The contiguous output buffer from which data is serialized. Passing nullptr is allowed and can be used to determine the required output buffer size |
| [in] | inputDataSize | The number of bytes from the input data buffer to serialize |
Implements jaffarCommon::serializer::Base.