Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::LZ4DataCompressor Class Reference

Compression service using the 'LZ4' library. More...

Inheritance diagram for Arcane::LZ4DataCompressor:
Collaboration diagram for Arcane::LZ4DataCompressor:

Public Member Functions

 LZ4DataCompressor (const ServiceBuildInfo &sbi)
void build () override
 Build-level construction of the service.
String name () const override
 Algorithm name.
Int64 minCompressSize () const override
 Minimum array size below which compression is not useful.
void compress (Span< const std::byte > values, Array< std::byte > &compressed_values) override
 Compresses the data values and stores it in compressed_values.
void decompress (Span< const std::byte > compressed_values, Span< std::byte > values) override
 Decompresses the data compressed_values and stores it in values.
Public Member Functions inherited from Arcane::AbstractService
 ~AbstractService () override
 Destructor.
IServiceInfoserviceInfo () const override
 Access to service information. See IServiceInfo for details.
IBaseserviceParent () const override
 Access to the base interface of main Arcane objects.
IServiceserviceInterface () override
 Returns the low-level IService interface of the service.
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () const
 Trace manager.
TraceMessage info () const
 Flow for an information message.
TraceMessage pinfo () const
 Flow for a parallel information message.
TraceMessage info (char category) const
 Flow for an information message of a given category.
TraceMessage pinfo (char category) const
 Flow for a parallel information message of a given category.
TraceMessage info (bool v) const
 Flow for an information message.
TraceMessage warning () const
 Flow for a warning message.
TraceMessage pwarning () const
TraceMessage error () const
 Flow for an error message.
TraceMessage perror () const
TraceMessage log () const
 Flow for a log message.
TraceMessage plog () const
 Flow for a log message.
TraceMessage logdate () const
 Flow for a log message preceded by the date.
TraceMessage fatal () const
 Flow for a fatal error message.
TraceMessage pfatal () const
 Flow for a parallel fatal error message.
TraceMessageDbg debug (Trace::eDebugLevel=Trace::Medium) const
 Flow for a debug message.
Trace::eDebugLevel configDbgLevel () const
 Debug level of the configuration file.
TraceMessage info (Int32 verbose_level) const
 Flow for an information message of a given level.
TraceMessage linfo () const
 Flow for an information message with the local information level of this instance.
TraceMessage linfo (Int32 relative_level) const
 Flow for an information message with the local information level of this instance.
void fatalMessage (const StandaloneTraceMessage &o) const
Public Member Functions inherited from Arcane::IService
virtual ~IService ()
 Releases resources.

Private Member Functions

int _toInt (Int64 vsize)

Private Attributes

String m_name

Additional Inherited Members

Protected Member Functions inherited from Arcane::AbstractService
 AbstractService (const ServiceBuildInfo &)
 Constructor from a ServiceBuildInfo.
Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const
Protected Member Functions inherited from Arcane::IService
 IService ()
 Constructor.

Detailed Description

Compression service using the 'LZ4' library.

Definition at line 106 of file LZ4DeflateService.cc.

Constructor & Destructor Documentation

◆ LZ4DataCompressor()

Arcane::LZ4DataCompressor::LZ4DataCompressor ( const ServiceBuildInfo & sbi)
inlineexplicit

Definition at line 112 of file LZ4DeflateService.cc.

Member Function Documentation

◆ _toInt()

int Arcane::LZ4DataCompressor::_toInt ( Int64 vsize)
inlineprivate

Definition at line 171 of file LZ4DeflateService.cc.

◆ build()

void Arcane::LZ4DataCompressor::build ( void )
inlineoverridevirtual

Build-level construction of the service.

This method is called right after the constructor.

Reimplemented from Arcane::AbstractService.

Definition at line 120 of file LZ4DeflateService.cc.

◆ compress()

void Arcane::LZ4DataCompressor::compress ( Span< const std::byte > values,
Array< std::byte > & compressed_values )
inlineoverridevirtual

Compresses the data values and stores it in compressed_values.

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

Implements Arcane::IDataCompressor.

Definition at line 123 of file LZ4DeflateService.cc.

References ARCANE_THROW, Arcane::Array< T >::data(), Arcane::SpanImpl< T, SizeType, Extent >::data(), Arcane::TraceAccessor::info(), Arcane::Array< T >::resize(), and Arcane::SpanImpl< T, SizeType, Extent >::size().

Here is the call graph for this function:

◆ decompress()

void Arcane::LZ4DataCompressor::decompress ( Span< const std::byte > compressed_values,
Span< std::byte > values )
inlineoverridevirtual

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.

Implements Arcane::IDataCompressor.

Definition at line 151 of file LZ4DeflateService.cc.

References ARCANE_THROW, Arcane::SpanImpl< T, SizeType, Extent >::data(), Arcane::TraceAccessor::info(), and Arcane::SpanImpl< T, SizeType, Extent >::size().

Here is the call graph for this function:

◆ minCompressSize()

Int64 Arcane::LZ4DataCompressor::minCompressSize ( ) const
inlineoverridevirtual

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).

Implements Arcane::IDataCompressor.

Definition at line 122 of file LZ4DeflateService.cc.

◆ name()

String Arcane::LZ4DataCompressor::name ( ) const
inlineoverridevirtual

Algorithm name.

Implements Arcane::IDataCompressor.

Definition at line 121 of file LZ4DeflateService.cc.

Member Data Documentation

◆ m_name

String Arcane::LZ4DataCompressor::m_name
private

Definition at line 167 of file LZ4DeflateService.cc.


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