class Decompressor

Defined at line 31 of file ../../src/storage/volume_image/utils/decompressor.h

This interface represents a compressor state machine.

Prepare -> Decompress -+-+-> Finalize -+-+-> End

^ ^ | |

| |+-+-+| |

|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|

In order to compress independent uncompressed data blocks, the user

must go through |Finalize| -> |Prepare| state transition, allowing for new,

independent data to be compressed.

In order to decompress the output of a compressor, the symbols generated

by the compressor must be fed in sequential order to the decompressor.

This class is thread-unsafe, since there might be buffered data from previous calls.

Public Methods

fpromise::result<void, std::string> Prepare (Handler handler)

Returns |fpromise::ok| on success. Setting |handler| for consuming symbols emitted during

decompression.

On failure, returns a string decribing the error condition.

fpromise::result<DecompressResult, std::string> Decompress (std::span<const uint8_t> compressed_data)

Returns |fpromise::ok| on success. When data has been fully decompressed, will return a

|DecompressResult| instance.

On failure, returns a string decribing the error condition.

fpromise::result<void, std::string> Finalize ()

Returns |fpromise::ok| on success. At this point all remaining symbols for the decompressed

representation will be emitted.

On failure, returns a string describing the error condition.

void ~Decompressor ()

Defined at line 55 of file ../../src/storage/volume_image/utils/decompressor.h

Records