jaffarCommon
Loading...
Searching...
No Matches
Public Member Functions | List of all members
jaffarCommon::deserializer::Differential Class Referencefinal

#include <differential.hpp>

Inheritance diagram for jaffarCommon::deserializer::Differential:
Inheritance graph
[legend]
Collaboration diagram for jaffarCommon::deserializer::Differential:
Collaboration graph
[legend]

Public Member Functions

 Differential (const void *__restrict inputDataBuffer=nullptr, const size_t inputDataBufferSize=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 popContiguous (void *const __restrict outputDataBuffer, const size_t outputDataSize) override
 
__JAFFAR_COMMON__INLINE__ void pop (void *const __restrict outputDataBuffer, const size_t outputDataSize) override
 
size_t getReferenceDataBufferPos () const
 
size_t getDifferentialBytesCount () const
 
- Public Member Functions inherited from jaffarCommon::deserializer::Base
 Base (const void *__restrict inputDataBuffer, const size_t inputDataBufferSize)
 
__JAFFAR_COMMON__INLINE__ size_t getInputSize () const
 
__JAFFAR_COMMON__INLINE__ const uint8_t * getInputDataBuffer () const
 

Additional Inherited Members

- Protected Attributes inherited from jaffarCommon::deserializer::Base
const uint8_t *__restrict const _inputDataBuffer
 
const size_t _inputDataBufferSize
 
size_t _inputDataBufferPos = 0
 

Detailed Description

The differential deserialization class enables the decompression of a differential input buffer that, when applied to a reference data buffer, produces the original source data. The decompression 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.

Constructor & Destructor Documentation

◆ Differential()

jaffarCommon::deserializer::Differential::Differential ( const void *__restrict  inputDataBuffer = nullptr,
const size_t  inputDataBufferSize = 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 
)
inline

Default constructor for the differntial deserializer class

Parameters
[in]inputDataBufferThe input buffer from whence to read the input data
[in]inputDataBufferSizeThe size of the input buffer
[in]referenceDataBufferThe buffer from whence to read the reference data
[in]referenceDataBufferSizeThe size of the reference buffer
[in]useZlibSpecifies whether to apply Zlib decompression before the differential decompression

Member Function Documentation

◆ getDifferentialBytesCount()

size_t jaffarCommon::deserializer::Differential::getDifferentialBytesCount ( ) const
inline

Gets the number of differential bytes included in the serialized output

This is useful to make sure the differential part of the deserialization is not exceeded

Returns
The number of bytes used in differential decompression

◆ getReferenceDataBufferPos()

size_t jaffarCommon::deserializer::Differential::getReferenceDataBufferPos ( ) const
inline

Get the position of the reference buffer header.

Returns
The position of the reference buffer header. This value represents the size of the reference data at the end of the deserialization process

◆ pop()

__JAFFAR_COMMON__INLINE__ void jaffarCommon::deserializer::Differential::pop ( void *const __restrict  outputDataBuffer,
const size_t  outputDataBufferSize 
)
inlineoverridevirtual

Deserializes the specified number of bytes onto the output data buffer, popping the information from the input buffer

Note
The input buffer may be compressed or non-contiguous
Parameters
[out]outputDataBufferThe contiguous output buffer onto which to deserialize.
[in]outputDataBufferSizeThe number of bytes to save onto the output buffer

Implements jaffarCommon::deserializer::Base.

◆ popContiguous()

__JAFFAR_COMMON__INLINE__ void jaffarCommon::deserializer::Differential::popContiguous ( void *const __restrict  outputDataBuffer,
const size_t  outputDataBufferSize 
)
inlineoverridevirtual

Deserializes the specified number of contiguous bytes onto the output data buffer, popping the information from the input buffer

Note
This function forces the treatment of the input and output as uncompressed contiguous buffers
Parameters
[out]outputDataBufferThe contiguous output buffer onto which to deserialize
[in]outputDataBufferSizeThe number of bytes to save onto the output buffer

Implements jaffarCommon::deserializer::Base.


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