Skip to content

Class drift::IWaveletBufferSerializer

ClassList > drift > IWaveletBufferSerializer

Inherited by the following classes: drift::WaveletBufferSerializer, drift::WaveletBufferSerializerLegacy

Public Functions

Type Name
virtual std::unique_ptr< WaveletBuffer > Parse (const std::string & blob) = 0
virtual bool Serialize (const WaveletBuffer & buffer, std::string * blob, uint8_t sf_compression=0) = 0
virtual ~IWaveletBufferSerializer () = default

Public Functions Documentation

function Parse

virtual std::unique_ptr< WaveletBuffer > drift::IWaveletBufferSerializer::Parse (
    const std::string & blob
) = 0

Parses subbands from a blob of data and creates a new buffer

Parameters:

  • blob the blob of subbands

Returns:

nullptr if it failed to parse the buffer

function Serialize

virtual bool drift::IWaveletBufferSerializer::Serialize (
    const WaveletBuffer & buffer,
    std::string * blob,
    uint8_t sf_compression=0
) = 0

Serialize the buffer into the blob for saving in a file or sending via network

Parameters:

  • blob the blob to serialize
  • sf_compression - 0 - switch off, 31 - max compression(2-bits).

Returns:

return true if it has no error

function ~IWaveletBufferSerializer

virtual drift::IWaveletBufferSerializer::~IWaveletBufferSerializer () = default

The documentation for this class was generated from the following file wavelet_buffer/wavelet_buffer_serializer.h