NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
CZipCloudflareDecompressor Class Reference

Search Toolkit Book for CZipCloudflareDecompressor

CZipCloudflareDecompressor – zlib based decompressor. More...

#include <util/compress/zlib_cloudflare.hpp>

+ Inheritance diagram for CZipCloudflareDecompressor:
+ Collaboration diagram for CZipCloudflareDecompressor:

Public Member Functions

 CZipCloudflareDecompressor (TZipFlags flags=0)
 Constructor. More...
 
virtual ~CZipCloudflareDecompressor (void)
 Destructor. More...
 
virtual bool AllowEmptyData () const
 Return TRUE if fAllowEmptyData flag is set. More...
 
- Public Member Functions inherited from CZipCloudflareCompression
 CZipCloudflareCompression (ELevel level=eLevel_Default)
 Constructor. More...
 
virtual ~CZipCloudflareCompression (void)
 Destructor. More...
 
virtual CVersionInfo GetVersion (void) const
 Return name and version of the compression library. More...
 
virtual ELevel GetDefaultLevel (void) const
 Returns default compression level for a compression algorithm. More...
 
virtual bool HaveSupport (ESupportFeature feature)
 Check if compression have support for a specified feature. More...
 
virtual bool CompressBuffer (const void *src_buf, size_t src_len, void *dst_buf, size_t dst_size, size_t *dst_len)
 Compress data in the buffer. More...
 
virtual bool DecompressBuffer (const void *src_buf, size_t src_len, void *dst_buf, size_t dst_size, size_t *dst_len)
 Decompress data in the buffer. More...
 
virtual size_t EstimateCompressionBufferSize (size_t src_len)
 Estimate buffer size for data compression. More...
 
virtual bool CompressFile (const string &src_file, const string &dst_file, size_t file_io_bufsize=kCompressionDefaultBufSize, size_t compression_in_bufsize=kCompressionDefaultBufSize, size_t compression_out_bufsize=kCompressionDefaultBufSize)
 Compress file. More...
 
virtual bool DecompressFile (const string &src_file, const string &dst_file, size_t file_io_bufsize=kCompressionDefaultBufSize, size_t decompression_in_bufsize=kCompressionDefaultBufSize, size_t decompression_out_bufsize=kCompressionDefaultBufSize)
 Decompress file. More...
 
virtual bool DecompressFileIntoDir (const string &src_file, const string &dst_dir, size_t file_io_bufsize=kCompressionDefaultBufSize, size_t decompression_in_bufsize=kCompressionDefaultBufSize, size_t decompression_out_bufsize=kCompressionDefaultBufSize)
 Decompress file into specified directory. More...
 
virtual bool SetDictionary (CCompressionDictionary &dict, ENcbiOwnership own=eNoOwnership)
 Set a dictionary for all compression/decompression operations. More...
 
void SetStrategy (int strategy)
 Compression strategy. More...
 
int GetStrategy (void) const
 
void SetMemoryLevel (int mem_level)
 Memory level. More...
 
int GetMemoryLevel (void) const
 
void SetWindowBits (int window_bits)
 Window bits. More...
 
int GetWindowBits (void) const
 
- Public Member Functions inherited from CCompression
 CCompression (ELevel level=eLevel_Default)
 
virtual ~CCompression (void)
 
virtual void SetLevel (ELevel level)
 Get/set compression level. More...
 
virtual ELevel GetLevel (void) const
 
virtual int GetErrorCode (void) const
 Get compressor's internal status/error code and description for the last operation. More...
 
virtual string GetErrorDescription (void) const
 
virtual TFlags GetFlags (void) const
 Get/set flags. More...
 
virtual void SetFlags (TFlags flags)
 
- Public Member Functions inherited from ICompression
virtual ~ICompression (void)
 Destructor. More...
 
- Public Member Functions inherited from CCompressionProcessor
 CCompressionProcessor (void)
 
virtual ~CCompressionProcessor (void)
 
bool IsBusy (void) const
 Return compressor's busy flag. More...
 
size_t GetProcessedSize (void)
 
size_t GetOutputSize (void)
 

Protected Member Functions

virtual EStatus Init (void)
 Initialize the internal stream state for compression/decompression. More...
 
virtual EStatus Process (const char *in_buf, size_t in_len, char *out_buf, size_t out_size, size_t *in_avail, size_t *out_avail)
 Compress/decompress as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. More...
 
virtual EStatus Flush (char *out_buf, size_t out_size, size_t *out_avail)
 Flush compressed/decompressed data from the output buffer. More...
 
virtual EStatus Finish (char *out_buf, size_t out_size, size_t *out_avail)
 Finish the compression/decompression process. More...
 
virtual EStatus End (int abandon=0)
 Free all dynamically allocated data structures. More...
 
- Protected Member Functions inherited from CZipCloudflareCompression
string FormatErrorMessage (string where, size_t pos=0) const
 Format string with last error description. More...
 
- Protected Member Functions inherited from CCompression
void SetError (int status, const char *description=0)
 Set last action error/status code and description. More...
 
void SetError (int status, const string &description)
 
virtual bool x_CompressFile (const string &src_file, CCompressionFile &dst_file, size_t file_io_bufsize=kCompressionDefaultBufSize)
 Universal file compression function. More...
 
virtual bool x_DecompressFile (CCompressionFile &src_file, const string &dst_file, size_t file_io_bufsize=kCompressionDefaultBufSize)
 Universal file decompression function. More...
 
- Protected Member Functions inherited from CCompressionProcessor
void Reset (void)
 Reset internal state. More...
 
void SetBusy (bool busy=true)
 Set/unset compressor busy flag. More...
 
void IncreaseProcessedSize (size_t n_bytes)
 
void IncreaseOutputSize (size_t n_bytes)
 

Private Attributes

bool m_NeedCheckHeader
 TRUE if needed to check to file header. More...
 
bool m_IsGZ
 TRUE if data have gzip format. More...
 
size_t m_SkipInput
 Number of bytes to skip from input stream. More...
 
string m_Cache
 Buffer to cache small pieces of data. More...
 

Additional Inherited Members

- Public Types inherited from CZipCloudflareCompression
enum  EFlags {
  fAllowTransparentRead = (1<<0) , fAllowEmptyData = (1<<1) , fCheckFileHeader = (1<<2) , fWriteGZipFormat = (1<<3) ,
  fAllowConcatenatedGZip = (1<<4) , fGZip = fCheckFileHeader | fWriteGZipFormat | fAllowConcatenatedGZip , fRestoreFileAttr = (1<<5)
}
 Compression/decompression flags. More...
 
typedef CZipCloudflareCompression::TFlags TZipFlags
 Bitwise OR of EFlags. More...
 
- Public Types inherited from ICompression
enum  ELevel {
  eLevel_Default = -1 , eLevel_NoCompression = 0 , eLevel_Lowest = 1 , eLevel_VeryLow = 2 ,
  eLevel_Low = 3 , eLevel_MediumLow = 4 , eLevel_Medium = 5 , eLevel_MediumHigh = 6 ,
  eLevel_High = 7 , eLevel_VeryHigh = 8 , eLevel_Best = 9
}
 Compression level. More...
 
enum  ESupportFeature { eFeature_NoCompression , eFeature_Dictionary , eFeature_EstimateCompressionBufferSize }
 Supported features. More...
 
typedef unsigned int TFlags
 Compression flags. More...
 
- Public Types inherited from CCompressionProcessor
enum  EStatus {
  eStatus_Success , eStatus_EndOfData , eStatus_Error , eStatus_Overflow ,
  eStatus_Repeat , eStatus_Unknown
}
 Type of the result of all basic functions. More...
 
- Static Public Member Functions inherited from CZipCloudflareCompression
static bool Initialize (void)
 Initialize compression library (for API compatibility, zlib don't need it). More...
 
static SRecommendedBufferSizes GetRecommendedBufferSizes (size_t round_up=0)
 Get recommended buffer sizes for stream/file I/O. More...
 
static int GetStrategyDefault (void)
 
static int GetStrategyMin (void)
 
static int GetStrategyMax (void)
 
static int GetMemoryLevelDefault (void)
 
static int GetMemoryLevelMin (void)
 
static int GetMemoryLevelMax (void)
 
static int GetWindowBitsDefault (void)
 
static int GetWindowBitsMin (void)
 
static int GetWindowBitsMax (void)
 
- Protected Types inherited from CCompression
enum  EDecompressMode { eMode_Unknown , eMode_Decompress , eMode_TransparentRead }
 Decompression mode (see fAllowTransparentRead flag). More...
 
- Protected Attributes inherited from CZipCloudflareCompression
void * m_Stream
 Compressor stream. More...
 
int m_cd_WindowBits
 The base two logarithm of the window size. More...
 
int m_c_MemLevel
 The allocation memory level for the compression. More...
 
int m_c_Strategy
 The parameter to tune up a compression algorithm. More...
 
- Protected Attributes inherited from CCompression
EDecompressMode m_DecompressMode
 Decompress mode (Decompress/TransparentRead/Unknown) More...
 
CCompressionDictionarym_Dict
 Dictionary for compression/decompression. More...
 
ENcbiOwnership m_DictOwn
 Dictionary ownership. More...
 

Detailed Description

CZipCloudflareDecompressor – zlib based decompressor.

Used in CZipCloudflareStreamDecompressor.

See also
CZipCloudflareStreamDecompressor, CZipCloudflareCompression, CCompressionProcessor

Definition at line 704 of file zlib_cloudflare.hpp.


The documentation for this class was generated from the following file:
Modified on Sun Mar 03 03:15:22 2024 by modify_doxy.py rev. 669887