3 #ifndef INCLUDE_NN_NLIB_OSS_LZ4INPUTSTREAM_H_ 4 #define INCLUDE_NN_NLIB_OSS_LZ4INPUTSTREAM_H_ 11 #if defined(_MSC_VER) && defined(nx_oss_lz4_EXPORTS) 12 #undef NLIB_VIS_PUBLIC 13 #define NLIB_VIS_PUBLIC NLIB_WINEXPORT 19 class Lz4OutputTransform;
25 pref_.frameInfo.blockMode = LZ4F_blockLinked;
26 pref_.compressionLevel = 9;
30 pref_.frameInfo.contentSize = size;
33 return pref_.frameInfo.contentSize;
40 pref_.compressionLevel = level;
43 return pref_.compressionLevel;
46 pref_.frameInfo.blockSizeID = max_block_size;
49 return pref_.frameInfo.blockSizeID;
52 pref_.frameInfo.blockMode = independence ? LZ4F_blockIndependent : LZ4F_blockLinked;
55 return (pref_.frameInfo.blockMode != LZ4F_blockLinked);
59 LZ4F_preferences_t pref_;
60 friend class Lz4OutputTransform;
69 return this->Init(settings);
74 struct Lz4OutputStreamPrivate;
75 Lz4OutputStreamPrivate* prv_;
82 #if defined(_MSC_VER) && defined(nx_oss_lz4_EXPORTS) 83 #undef NLIB_VIS_PUBLIC 84 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT 87 #endif // INCLUDE_NN_NLIB_OSS_LZ4INPUTSTREAM_H_ Lz4OutputStreamSettings() noexcept
Instantiates the object with default parameters (default constructor).
#define NLIB_OVERRIDE
Defines override if it is available for use. If not, holds an empty string.
uint64_t GetContentSize() const noexcept
Gets the value specified with SetContentSize(). The default is 0.
#define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
Prohibits use of the copy constructor and assignment operator for the class specified by TypeName...
~Lz4OutputStreamSettings() noexcept
Destructor.
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 re...
void SetContentSize(uint64_t size) noexcept
Data with the size before compression can be included in data compressed with LZ4.
The class to obtain and configure the Lz4OutputStream settings.
The base class for classes that act internally like OutputStream to convert data. ...
errno_t Init() noexcept
Initializes the stream with the default settings.
bool GetBlockIndependence() const noexcept
Gets the value specified with SetBlockIndependence(). The default is false.
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
A file that contains the configuration information for each development environment.
void SetBlockIndependence(bool independence) noexcept
Sets whether a compressed data block can be uncompressed independently.
LZ4F_blockSizeID_t GetMaxBlockSize() const noexcept
Gets the value specified with SetMaxBlockSize(). The default is LZ4F_default.
The stream class to write data according to the LZ4 frame format.
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
Defines the base class for output streams.
Lz4OutputStream() noexcept
Instantiates the object with default parameters (default constructor). Must be initialized with Init(...
int GetCompressionLevel() noexcept
Gets the value specified with SetCompressionLevel(). The default is 9.
void SetCompressionLevel(int level) noexcept
Sets a compression level. The compression rate is an integer in a range from 0 to 16...