Skip to content

Commit

Permalink
Deprecation of two compression methods (#2139)
Browse files Browse the repository at this point in the history
* Implementation of bzip2 and zlib deprecation
  • Loading branch information
Alexsandruss authored Oct 25, 2022
1 parent 9bd45aa commit 1cf1de5
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 761 deletions.
32 changes: 16 additions & 16 deletions cpp/daal/include/data_management/compression/bzip2compression.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace interface1
/**
* <a name="DAAL-CLASS-DATA_MANAGEMENT__BZIP2COMPRESSIONPARAMETER"></a>
*
* \brief Parameter for bzip2 compression and decompression
* \brief Parameter for bzip2 compression and decompression \DAAL_DEPRECATED
*
* \snippet compression/bzip2compression.h Bzip2CompressionParameter source code
*
Expand All @@ -61,15 +61,15 @@ class DAAL_EXPORT Bzip2CompressionParameter : public data_management::Compressio
* \param[in] clevel %Compression level, \ref CompressionLevel.
* defaultLevel is equal to bzip2 compression level 9
*/
Bzip2CompressionParameter(CompressionLevel clevel = defaultLevel) : data_management::CompressionParameter(clevel) {}
DAAL_DEPRECATED Bzip2CompressionParameter(CompressionLevel clevel = defaultLevel) : data_management::CompressionParameter(clevel) {}
~Bzip2CompressionParameter() {}
};
/* [Bzip2CompressionParameter source code] */

/**
* <a name="DAAL-CLASS-COMPRESSOR_BZIP2"></a>
*
* \brief Implementation of the Compressor class for the bzip2 compression method
* \brief Implementation of the Compressor class for the bzip2 compression method \DAAL_DEPRECATED
* <!-- \n<a href="DAAL-REF-COMPRESSION">Data compression usage model</a> -->
*
* \par References
Expand All @@ -83,34 +83,34 @@ class DAAL_EXPORT Compressor<bzip2> : public data_management::CompressorImpl
/**
* \brief Compressor<bzip2> constructor
*/
Compressor();
DAAL_DEPRECATED Compressor();
~Compressor();
/**
* Associates an input data block with a compressor
* \param[in] inBlock Pointer to the data block to compress. Must be at least size+offset bytes
* \param[in] size Number of bytes to compress in inBlock
* \param[in] offset Offset in bytes, the starting position for compression in inBlock
*/
void setInputDataBlock(byte * inBlock, size_t size, size_t offset);
DAAL_DEPRECATED void setInputDataBlock(byte * inBlock, size_t size, size_t offset);
/**
* Associates an input data block with a compressor
* \param[in] inBlock Reference to the data block to compress
*/
void setInputDataBlock(DataBlock & inBlock) { return setInputDataBlock(inBlock.getPtr(), inBlock.getSize(), 0); }
DAAL_DEPRECATED void setInputDataBlock(DataBlock & inBlock) { return setInputDataBlock(inBlock.getPtr(), inBlock.getSize(), 0); }
/**
* Performs bzip2 compression of a data block
* \param[out] outBlock Pointer to the data block where compression results are stored. Must be at least size+offset bytes
* \param[in] size Number of bytes available in outBlock
* \param[in] offset Offset in bytes, the starting position for compression in outBlock
*/
void run(byte * outBlock, size_t size, size_t offset);
DAAL_DEPRECATED void run(byte * outBlock, size_t size, size_t offset);
/**
* Performs bzip2 compression of a data block
* \param[out] outBlock Reference to the data block where compression results are stored
*/
void run(DataBlock & outBlock) { run(outBlock.getPtr(), outBlock.getSize(), 0); }
DAAL_DEPRECATED void run(DataBlock & outBlock) { run(outBlock.getPtr(), outBlock.getSize(), 0); }

Bzip2CompressionParameter parameter; /*!< Bzip2 compression parameters structure */
DAAL_DEPRECATED Bzip2CompressionParameter parameter; /*!< Bzip2 compression parameters structure */

protected:
void initialize();
Expand All @@ -132,7 +132,7 @@ class DAAL_EXPORT Compressor<bzip2> : public data_management::CompressorImpl
/**
* <a name="DAAL-CLASS-DECOMPRESSOR_BZI2"></a>
*
* \brief Specialization of Decompressor class for Bzip2 compression method
* \brief Specialization of Decompressor class for Bzip2 compression method \DAAL_DEPRECATED
* <!-- \n<a href="DAAL-REF-COMPRESSION">Data compression usage model</a> -->
*
* \par References
Expand All @@ -146,34 +146,34 @@ class DAAL_EXPORT Decompressor<bzip2> : public data_management::DecompressorImpl
/**
* \brief Decompressor<bzip2> constructor
*/
Decompressor();
DAAL_DEPRECATED Decompressor();
~Decompressor();
/**
* Associates an input data block with a decompressor
* \param[in] inBlock Pointer to the data block to decompress. Must be at least size+offset bytes
* \param[in] size Number of bytes to decompress in inBlock
* \param[in] offset Offset in bytes, the starting position for decompression in inBlock
*/
void setInputDataBlock(byte * inBlock, size_t size, size_t offset);
DAAL_DEPRECATED void setInputDataBlock(byte * inBlock, size_t size, size_t offset);
/**
* Associates an input data block with a decompressor
* \param[in] inBlock Reference to the data block to decompress
*/
void setInputDataBlock(DataBlock & inBlock) { setInputDataBlock(inBlock.getPtr(), inBlock.getSize(), 0); }
DAAL_DEPRECATED void setInputDataBlock(DataBlock & inBlock) { setInputDataBlock(inBlock.getPtr(), inBlock.getSize(), 0); }
/**
* Performs bzip2 decompression of a data block
* \param[out] outBlock Pointer to the data block where decompression results are stored. Must be at least size+offset bytes
* \param[in] size Number of bytes available in outBlock
* \param[in] offset Offset in bytes, the starting position for decompression in outBlock
*/
void run(byte * outBlock, size_t size, size_t offset);
DAAL_DEPRECATED void run(byte * outBlock, size_t size, size_t offset);
/**
* Performs bzip2 decompression of a data block
* \param[out] outBlock Reference to the data block where decompression results are stored
*/
void run(DataBlock & outBlock) { run(outBlock.getPtr(), outBlock.getSize(), 0); }
DAAL_DEPRECATED void run(DataBlock & outBlock) { run(outBlock.getPtr(), outBlock.getSize(), 0); }

Bzip2CompressionParameter parameter; /*!< Bzip2 compression parameters structure */
DAAL_DEPRECATED Bzip2CompressionParameter parameter; /*!< Bzip2 compression parameters structure */

protected:
void initialize();
Expand Down
32 changes: 16 additions & 16 deletions cpp/daal/include/data_management/compression/zlibcompression.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace interface1
/**
* <a name="DAAL-CLASS-DATA_MANAGEMENT__ZLIBCOMPRESSIONPARAMETER"></a>
*
* \brief Parameter for zlib compression and decompression
* \brief Parameter for zlib compression and decompression \DAAL_DEPRECATED
*
* \snippet compression/zlibcompression.h ZlibCompressionParameter source code
*
Expand All @@ -55,7 +55,7 @@ class DAAL_EXPORT ZlibCompressionParameter : public data_management::Compression
* defaultLevel is equal to zlib compression level 6
* \param bgzHeader Optional flag. True if a simple GZIP header is included, false otherwise
*/
ZlibCompressionParameter(CompressionLevel clevel = defaultLevel, bool bgzHeader = false)
DAAL_DEPRECATED ZlibCompressionParameter(CompressionLevel clevel = defaultLevel, bool bgzHeader = false)
: data_management::CompressionParameter(clevel), gzHeader(bgzHeader)
{}

Expand All @@ -68,7 +68,7 @@ class DAAL_EXPORT ZlibCompressionParameter : public data_management::Compression
/**
* <a name="DAAL-CLASS-COMPRESSOR_ZLIB"></a>
*
* \brief Implementation of the Compressor class for the zlib compression method
* \brief Implementation of the Compressor class for the zlib compression method \DAAL_DEPRECATED
* <!-- \n<a href="DAAL-REF-COMPRESSION">Data compression usage model</a> -->
*
* \par References
Expand All @@ -82,34 +82,34 @@ class DAAL_EXPORT Compressor<zlib> : public data_management::CompressorImpl
/**
* \brief Compressor<zlib> constructor
*/
Compressor();
DAAL_DEPRECATED Compressor();
~Compressor();
/**
* Associates an input data block with a compressor
* \param[in] inBlock Pointer to the data block to compress. Must be at least size+offset bytes
* \param[in] size Number of bytes to compress in inBlock
* \param[in] offset Offset in bytes, the starting position for compression in inBlock
*/
void setInputDataBlock(byte * inBlock, size_t size, size_t offset);
DAAL_DEPRECATED void setInputDataBlock(byte * inBlock, size_t size, size_t offset);
/**
* Associates an input data block with a compressor
* \param[in] inBlock Reference to the data block to compress
*/
void setInputDataBlock(DataBlock & inBlock) { setInputDataBlock(inBlock.getPtr(), inBlock.getSize(), 0); }
DAAL_DEPRECATED void setInputDataBlock(DataBlock & inBlock) { setInputDataBlock(inBlock.getPtr(), inBlock.getSize(), 0); }
/**
* Performs zlib compression of a data block
* \param[out] outBlock Pointer to the data block where compression results are stored. Must be at least size+offset bytes
* \param[in] size Number of bytes available in outBlock
* \param[in] offset Offset in bytes, the starting position for compression in outBlock
*/
void run(byte * outBlock, size_t size, size_t offset);
DAAL_DEPRECATED void run(byte * outBlock, size_t size, size_t offset);
/**
* Performs zlib compression of a data block
* \param[out] outBlock Reference to the data block where compression results are stored
*/
void run(DataBlock & outBlock) { run(outBlock.getPtr(), outBlock.getSize(), 0); }
DAAL_DEPRECATED void run(DataBlock & outBlock) { run(outBlock.getPtr(), outBlock.getSize(), 0); }

ZlibCompressionParameter parameter; /*!< Zlib compression parameters structure */
DAAL_DEPRECATED ZlibCompressionParameter parameter; /*!< Zlib compression parameters structure */

protected:
void initialize();
Expand All @@ -125,7 +125,7 @@ class DAAL_EXPORT Compressor<zlib> : public data_management::CompressorImpl
/**
* <a name="DAAL-CLASS-DECOMPRESSOR_ZLIB"></a>
*
* \brief Implementation of the Decompressor class for the zlib compression method
* \brief Implementation of the Decompressor class for the zlib compression method \DAAL_DEPRECATED
* <!-- \n<a href="DAAL-REF-COMPRESSION">Data compression usage model</a> -->
*
* \par References
Expand All @@ -139,34 +139,34 @@ class DAAL_EXPORT Decompressor<zlib> : public data_management::DecompressorImpl
/**
* \brief Decompressor<zlib> constructor
*/
Decompressor();
DAAL_DEPRECATED Decompressor();
~Decompressor();
/**
* Associates an input data block with a decompressor
* \param[in] inBlock Pointer to the data block to decompress. Must be at least size+offset bytes
* \param[in] size Number of bytes to decompress in inBlock
* \param[in] offset Offset in bytes, the starting position for decompression in inBlock
*/
void setInputDataBlock(byte * inBlock, size_t size, size_t offset);
DAAL_DEPRECATED void setInputDataBlock(byte * inBlock, size_t size, size_t offset);
/**
* Associates an input data block with a decompressor
* \param[in] inBlock Reference to the data block to decompress
*/
void setInputDataBlock(DataBlock & inBlock) { setInputDataBlock(inBlock.getPtr(), inBlock.getSize(), 0); }
DAAL_DEPRECATED void setInputDataBlock(DataBlock & inBlock) { setInputDataBlock(inBlock.getPtr(), inBlock.getSize(), 0); }
/**
* Performs zlib decompression of a data block
* \param[out] outBlock Pointer to the data block where decompression results are stored. Must be at least size+offset bytes
* \param[in] size Number of bytes available in outBlock
* \param[in] offset Offset in bytes, the starting position for decompression in outBlock
*/
void run(byte * outBlock, size_t size, size_t offset);
DAAL_DEPRECATED void run(byte * outBlock, size_t size, size_t offset);
/**
* Performs zlib decompression of a data block
* \param[out] outBlock Reference to the data block where decompression results are stored
*/
void run(DataBlock & outBlock) { run(outBlock.getPtr(), outBlock.getSize(), 0); }
DAAL_DEPRECATED void run(DataBlock & outBlock) { run(outBlock.getPtr(), outBlock.getSize(), 0); }

ZlibCompressionParameter parameter; /*!< Zlib compression parameters structure */
DAAL_DEPRECATED ZlibCompressionParameter parameter; /*!< Zlib compression parameters structure */

protected:
void initialize();
Expand Down
Loading

0 comments on commit 1cf1de5

Please sign in to comment.