nlib
nn::nlib::oss::Lz4OutputStreamSettings Class Reference

The class to obtain and configure the Lz4OutputStream settings. More...

#include "nn/nlib/oss/Lz4OutputStream.h"

Public Member Functions

void SetContentSize (uint64_t size) noexcept
 Data with the size before compression can be included in data compressed with LZ4. More...
 
uint64_t GetContentSize () const noexcept
 Gets the value specified with SetContentSize(). The default is 0.
 
void SetCompressionLevel (int level) noexcept
 Sets a compression level. The compression rate is an integer in a range from 0 to 16. The larger the value, the higher the compression rate. More...
 
int GetCompressionLevel () noexcept
 Gets the value specified with SetCompressionLevel(). The default is 9.
 
void SetMaxBlockSize (LZ4F_blockSizeID_t max_block_size) noexcept
 Sets the maximum data block size. The larger the size, the higher the speed, though more memory is required. More...
 
LZ4F_blockSizeID_t GetMaxBlockSize () const noexcept
 Gets the value specified with SetMaxBlockSize(). The default is LZ4F_default.
 
void SetBlockIndependence (bool independence) noexcept
 Sets whether a compressed data block can be uncompressed independently. More...
 
bool GetBlockIndependence () const noexcept
 Gets the value specified with SetBlockIndependence(). The default is false.
 
Basic Member Functions
 Lz4OutputStreamSettings () noexcept
 Instantiates the object with default parameters (default constructor). More...
 
 ~Lz4OutputStreamSettings () noexcept
 Destructor.
 

Detailed Description

The class to obtain and configure the Lz4OutputStream settings.

Description
This is an LZ4 wrapper class for LZ4F_preferences_t.

Definition at line 20 of file Lz4OutputStream.h.

Constructor & Destructor Documentation

§ Lz4OutputStreamSettings()

nn::nlib::oss::Lz4OutputStreamSettings::Lz4OutputStreamSettings ( )
inlinenoexcept

Instantiates the object with default parameters (default constructor).

Description
Configures the following settings for the LZ4F_preferences_t structure. Configures the structure to be encoded in a high compression rate format which can be uncompressed only in a single thread.
pref_.autoFlush = 1;
pref_.frameInfo.blockMode = LZ4F_blockLinked;
pref_.compressionLevel = 9;

Definition at line 22 of file Lz4OutputStream.h.

Member Function Documentation

§ SetBlockIndependence()

nn::nlib::oss::Lz4OutputStreamSettings::SetBlockIndependence ( bool  independence)
inlinenoexcept

Sets whether a compressed data block can be uncompressed independently.

Parameters
[in]independenceData block independence.
Description
If specifying true, data blocks can be uncompressed regardless of their order and compressed in a format that allows uncompression in a multi-thread environment. If false is set, content of other block data is used to increase the compression rate.

Definition at line 51 of file Lz4OutputStream.h.

§ SetCompressionLevel()

nn::nlib::oss::Lz4OutputStreamSettings::SetCompressionLevel ( int  level)
inlinenoexcept

Sets a compression level. The compression rate is an integer in a range from 0 to 16. The larger the value, the higher the compression rate.

Parameters
[in]levelCompression level.

Definition at line 35 of file Lz4OutputStream.h.

§ SetContentSize()

nn::nlib::oss::Lz4OutputStreamSettings::SetContentSize ( uint64_t  size)
inlinenoexcept

Data with the size before compression can be included in data compressed with LZ4.

Parameters
[in]sizeSpecifies the uncompressed data size.

Definition at line 29 of file Lz4OutputStream.h.

§ SetMaxBlockSize()

nn::nlib::oss::Lz4OutputStreamSettings::SetMaxBlockSize ( LZ4F_blockSizeID_t  max_block_size)
inlinenoexcept

Sets the maximum data block size. The larger the size, the higher the speed, though more memory is required.

Parameters
[in]max_block_sizeThe enum type value indicating the maximum data block size.
Description
For max_block_size, specify one of the following enum values.
Value Description
LZ4F_default LZ4F_max4MB
LZ4F_max64KB 64 KBytes
LZ4F_max256KB 256 KBytes
LZ4F_max1MB 1 MBytes
LZ4F_max4MB 4 MBytes

Definition at line 45 of file Lz4OutputStream.h.


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