Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::IDataCompressor Class Referenceabstract

Interface of a service for compressing/decompressing data. More...

#include <arcane/utils/IDataCompressor.h>

Public Member Functions

virtual void build ()=0
virtual String name () const =0
 Algorithm name.
virtual Int64 minCompressSize () const =0
 Minimum array size below which compression is not useful.
virtual void compress (Span< const std::byte > values, Array< std::byte > &compressed_values)=0
 Compresses the data values and stores it in compressed_values.
virtual void decompress (Span< const std::byte > compressed_values, Span< std::byte > values)=0
 Decompresses the data compressed_values and stores it in values.

Detailed Description

Interface of a service for compressing/decompressing data.

Definition at line 31 of file IDataCompressor.h.

Member Function Documentation

◆ compress()

virtual void Arcane::IDataCompressor::compress ( Span< const std::byte > values,
Array< std::byte > & compressed_values )
pure virtual

Compresses the data values and stores it in compressed_values.

This operation may throw an IOException exception in case of an error.

◆ decompress()

virtual void Arcane::IDataCompressor::decompress ( Span< const std::byte > compressed_values,
Span< std::byte > values )
pure virtual

Decompresses the data compressed_values and stores it in values.

values must already have been allocated to the necessary size to contain the decompressed data. This operation may throw an IOException exception in case of an error.

◆ minCompressSize()

virtual Int64 Arcane::IDataCompressor::minCompressSize ( ) const
pure virtual

Minimum array size below which compression is not useful.

This can be used by the caller to avoid compressing/decompressing certain arrays. This value is not used internally by this instance.

If the caller uses this value, consistency must be guaranteed both during compression and decompression (i.e.: do not call decompression for arrays whose decompressed size is less than minCompressSize() if the compress() method was not called for that array).


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