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. | |
Interface of a service for compressing/decompressing data.
Definition at line 31 of file IDataCompressor.h.
|
pure virtual |
Implemented in Arcane::Bzip2DataCompressor, Arcane::LZ4DataCompressor, and Arcane::ZstdDataCompressor.
|
pure virtual |
Compresses the data values and stores it in compressed_values.
This operation may throw an IOException exception in case of an error.
Implemented in Arcane::Bzip2DataCompressor, Arcane::LZ4DataCompressor, and Arcane::ZstdDataCompressor.
Referenced by Arcane::Array2DataT< DataType >::Impl::compressAndClear(), and Arcane::ArrayDataT< DataType >::Impl::compressAndClear().
|
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.
Implemented in Arcane::Bzip2DataCompressor, Arcane::LZ4DataCompressor, and Arcane::ZstdDataCompressor.
Referenced by Arcane::Array2DataT< DataType >::Impl::decompressAndFill(), and Arcane::ArrayDataT< DataType >::Impl::decompressAndFill().
|
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).
Implemented in Arcane::Bzip2DataCompressor, Arcane::LZ4DataCompressor, and Arcane::ZstdDataCompressor.
|
pure virtual |
Algorithm name.
Implemented in Arcane::Bzip2DataCompressor, Arcane::LZ4DataCompressor, and Arcane::ZstdDataCompressor.