NCBI C++ ToolKit
Classes | Macros | Typedefs | Enumerations | Enumerator | Functions | Variables | Friends
Compression

Classes

class  CArchive
 CArchive - base class for file- or memory-based archives. More...
 
struct  CArchive::SMask
 Mask storage. More...
 
class  CArchiveFile
 CArchiveFile – file-based archive. More...
 
class  CArchiveMemory
 CArchiveMemory – memory-based archive. More...
 
class  CArchiveCompressionFileStream
 CArchiveCompressionFileStream – file stream/descriptor based compression stream archive. More...
 
class  CArchiveException
 CArchiveException –. More...
 
class  CArchiveEntryInfo
 CArchiveEntryInfo class. More...
 
class  IArchive
 IArchive – abstract interface class for archive formats. More...
 
class  CBZip2Compression
 CBZip2Compression –. More...
 
class  CBZip2CompressionFile
 CBZip2CompressionFile class –. More...
 
class  CBZip2Compressor
 CBZip2Compressor – bzip2 based compressor. More...
 
class  CBZip2Decompressor
 CBZip2Decompressor – bzip2 based decompressor. More...
 
class  CBZip2StreamCompressor
 CBZip2StreamCompressor – bzip2 based compression stream processor. More...
 
class  CBZip2StreamDecompressor
 CBZip2StreamDecompressor – bzip2 based decompression stream processor. More...
 
class  ICompression
 
class  CCompression
 
struct  CCompression::SRecommendedBufferSizes
 Structure to get information about recommended buffer sizes for file/stream I/O to tune up a (de)compression performance. More...
 
class  CCompressionFile
 
class  CCompressionDictionary
 
class  CCompressionProcessor
 
class  CCompressionException
 
class  CCompressionUtil
 
class  IChunkHandler
 Interface class to scan data source for seekable data chunks. More...
 
class  CLZOCompression
 CLZOCompression –. More...
 
struct  CLZOCompression::SFileInfo
 Structure to keep compressed file information. More...
 
class  CLZOCompressionFile
 CLZOCompressionFile class –. More...
 
class  CLZOBuffer
 CLZOBuffer –. More...
 
class  CLZOCompressor
 CLZOCompressor – LZO based compressor. More...
 
class  CLZODecompressor
 CLZODecompressor – LZO based decompressor. More...
 
class  CLZOStreamCompressor
 CLZOStreamCompressor – lzo based compression stream processor. More...
 
class  CLZOStreamDecompressor
 CLZOStreamDecompressor – lzo based decompression stream processor. More...
 
class  CNlmZipBtRdr
 
class  CDynamicCharArray
 
class  CNlmZipReader
 
class  CTarException
 CTarException –. More...
 
class  CTarEntryInfo
 CTarEntryInfo class. More...
 
class  CTarUserEntryInfo
 User-creatable info for streaming into a tar. More...
 
class  CTar
 CTar class. More...
 
struct  CTar::SMask
 Mask storage. More...
 
class  CZipCompression
 CZipCompression –. More...
 
struct  CZipCompression::SFileInfo
 Structure to keep compressed file information. More...
 
class  CZipCompressionFile
 CZipCompressionFile –. More...
 
class  CZipCompressor
 CZipCompressor – zlib based compressor. More...
 
class  CZipDecompressor
 CZipDecompressor – zlib based decompressor. More...
 
class  CZipStreamCompressor
 CZipStreamCompressor – zlib based compression stream processor. More...
 
class  CZipStreamDecompressor
 CZipStreamDecompressor – zlib based decompression stream processor. More...
 
class  CZipCloudflareCompression
 CZipCloudflareCompression –. More...
 
struct  CZipCloudflareCompression::SFileInfo
 Structure to keep compressed file information. More...
 
class  CZipCloudflareCompressionFile
 CZipCloudflareCompressionFile –. More...
 
class  CZipCloudflareCompressor
 CZipCloudflareCompressor – zlib based compressor. More...
 
class  CZipCloudflareDecompressor
 CZipCloudflareDecompressor – zlib based decompressor. More...
 
class  CZipCloudflareStreamCompressor
 CZipCloudflareStreamCompressor – zlib based compression stream processor. More...
 
class  CZipCloudflareStreamDecompressor
 CZipCloudflareStreamDecompressor – zlib based decompression stream processor. More...
 
class  CArchiveZip
 CArchiveZip – implementation of IArchive interface for ZIP-archives. More...
 

Macros

#define ERR_COMPRESS(subcode, message)   ERR_POST_X(subcode, Warning << message)
 Macro to report errors in compression API. More...
 
#define COMPRESS_HANDLE_EXCEPTIONS(subcode, message)
 Macro to catch and handle exceptions (from streams in the destructor) More...
 

Typedefs

typedef CCompression::ELevel CArchive::ELevel
 
typedef unsigned int CArchive::TFlags
 Bitwise OR of EFlags. More...
 
typedef list< CArchiveEntryInfoCArchive::TEntries
 Define a list of entries. More...
 
typedef CDirEntry::EType CArchiveEntryInfo::EType
 Archive entry type (the same as directory entry type). More...
 
typedef CCompression::ELevel IArchive::ELevel
 
typedef size_t(* IArchive::Callback_Write) (const CArchiveEntryInfo &info, const void *buf, size_t n)
 Type of user-defined callback for extraction from archive. More...
 
typedef CBZip2Compression::TFlags CBZip2Compression::TBZip2Flags
 Bitwise OR of EFlags. More...
 
typedef unsigned int ICompression::TFlags
 Compression flags. More...
 
typedef void * CCompressionFile::TFile
 Compression file handler. More...
 
typedef Uint8 IChunkHandler::TPosition
 Type to store stream positions. More...
 
typedef CLZOCompression::TFlags CLZOCompression::TLZOFlags
 Bitwise OR of EFlags. More...
 
typedef int CNlmZipReader::TOwnership
 
typedef unsigned int TTarMode
 Bitwise OR of ETarModeBits. More...
 
typedef unsigned int CTar::TFlags
 Bitwise OR of EFlags. More...
 
typedef list< CTarEntryInfoCTar::TEntries
 Define a list of entries. More...
 
typedef pair< string, Uint8CTar::TFile
 Define a list of files with sizes (directories and specials, such as devices, must be given with sizes of 0; symlinks – with the sizes of the names they are linking to). More...
 
typedef list< TFileCTar::TFiles
 
typedef CZipCompression::TFlags CZipCompression::TZipFlags
 Bitwise OR of EFlags. More...
 
typedef CZipCloudflareCompression::TFlags CZipCloudflareCompression::TZipFlags
 Bitwise OR of EFlags. More...
 

Enumerations

enum  CArchive::EFormat { CArchive::eZip }
 Archive formats. More...
 
enum  CArchive::EFlags {
  CArchive::fOverwrite = (1<<3) , CArchive::fUpdate = (1<<4) | fOverwrite , CArchive::fBackup = (1<<5) | fOverwrite , CArchive::fEqualTypes = (1<<6) ,
  CArchive::fPreserveOwner = (1<<7) , CArchive::fPreserveMode = (1<<8) , CArchive::fPreserveTime = (1<<9) , CArchive::fPreserveAll = fPreserveOwner | fPreserveMode | fPreserveTime ,
  CArchive::fFollowLinks = (1<<2) , CArchive::fSkipUnsupported = (1<<15) , CArchive::fDefault = fOverwrite | fPreserveAll
}
 General flags. More...
 
enum  CArchive::EMaskType { CArchive::eFullPathMask , CArchive::ePatternMask }
 
enum  CArchive::ESupportFeature { CArchive::eFeature_Type , CArchive::eFeature_AbsolutePath , CArchive::eFeature_FileStream }
 
enum  CArchive::EOpenMode { CArchive::eNone = 0 , CArchive::eRO = 1 , CArchive::eWO = 2 , CArchive::eRW = eRO | eWO }
 Archive open mode. More...
 
enum  CArchive::EAction {
  CArchive::eUndefined = eNone , CArchive::eCreate = (1 << 8) | eWO , CArchive::eAppend = (1 << 9) | eWO , CArchive::eList = (1 << 10) | eRO ,
  CArchive::eUpdate = eList | eAppend , CArchive::eExtract = (1 << 11) | eRO , CArchive::eTest = eList | eExtract
}
 Action, performed on the archive. More...
 
enum  CArchiveException::EErrCode {
  CArchiveException::eUnsupported , CArchiveException::eMemory , CArchiveException::eUnsupportedEntryType , CArchiveException::eBadName ,
  CArchiveException::eCreate , CArchiveException::eOpen , CArchiveException::eClose , CArchiveException::eList ,
  CArchiveException::eExtract , CArchiveException::eAppend , CArchiveException::eWrite , CArchiveException::eBackup ,
  CArchiveException::eRestoreAttrs
}
 Error types that CArchive API can generate. More...
 
enum  IArchive::EDirection { IArchive::eRead , IArchive::eWrite }
 Processing direction. More...
 
enum  IArchive::ELocation { IArchive::eFile , IArchive::eFileStream , IArchive::eMemory }
 Archive location. More...
 
enum  CBZip2Compression::EFlags { CBZip2Compression::fAllowTransparentRead = (1<<0) , CBZip2Compression::fAllowEmptyData = (1<<1) }
 Compression/decompression flags. More...
 
enum  ICompression::ELevel {
  ICompression::eLevel_Default = -1 , ICompression::eLevel_NoCompression = 0 , ICompression::eLevel_Lowest = 1 , ICompression::eLevel_VeryLow = 2 ,
  ICompression::eLevel_Low = 3 , ICompression::eLevel_MediumLow = 4 , ICompression::eLevel_Medium = 5 , ICompression::eLevel_MediumHigh = 6 ,
  ICompression::eLevel_High = 7 , ICompression::eLevel_VeryHigh = 8 , ICompression::eLevel_Best = 9
}
 Compression level. More...
 
enum  ICompression::ESupportFeature { ICompression::eFeature_NoCompression , ICompression::eFeature_Dictionary , ICompression::eFeature_EstimateCompressionBufferSize }
 Supported features. More...
 
enum  CCompression::EDecompressMode { CCompression::eMode_Unknown , CCompression::eMode_Decompress , CCompression::eMode_TransparentRead }
 Decompression mode (see fAllowTransparentRead flag). More...
 
enum  CCompressionFile::EMode { CCompressionFile::eMode_Read , CCompressionFile::eMode_Write }
 File open mode. More...
 
enum  CCompressionProcessor::EStatus {
  CCompressionProcessor::eStatus_Success , CCompressionProcessor::eStatus_EndOfData , CCompressionProcessor::eStatus_Error , CCompressionProcessor::eStatus_Overflow ,
  CCompressionProcessor::eStatus_Repeat , CCompressionProcessor::eStatus_Unknown
}
 Type of the result of all basic functions. More...
 
enum  CCompressionException::EErrCode { CCompressionException::eCompression , CCompressionException::eCompressionFile }
 
enum  IChunkHandler::EAction { IChunkHandler::eAction_Continue , IChunkHandler::eAction_Stop }
 Action types. More...
 
enum  CLZOCompression::EFlags {
  CLZOCompression::fAllowTransparentRead = (1<<0) , CLZOCompression::fAllowEmptyData = (1<<1) , CLZOCompression::fChecksum = (1<<2) , CLZOCompression::fStreamFormat = (1<<3) ,
  CLZOCompression::fStoreFileInfo = (1<<4) | fStreamFormat
}
 Compression/decompression flags. More...
 
enum  CNlmZipBtRdr::EType { CNlmZipBtRdr::eType_unknown , CNlmZipBtRdr::eType_plain , CNlmZipBtRdr::eType_zlib }
 
enum  { CDynamicCharArray::kInititialSize = 8192 }
 
enum  CNlmZipReader::EOwnership { CNlmZipReader::fOwnNone = 0 , CNlmZipReader::fOwnReader = 1 << 1 , CNlmZipReader::fOwnAll = fOwnReader }
 Which of the objects (passed in the constructor) should be deleted on this object's destruction. More...
 
enum  { CNlmZipReader::kHeaderSize = 4 }
 
enum  CNlmZipReader::EHeader { CNlmZipReader::eHeaderNone , CNlmZipReader::eHeaderAlways , CNlmZipReader::eHeaderCheck }
 
enum  ETarModeBits {
  fTarSetUID = 04000 , fTarSetGID = 02000 , fTarSticky = 01000 , fTarURead = 00400 ,
  fTarUWrite = 00200 , fTarUExecute = 00100 , fTarGRead = 00040 , fTarGWrite = 00020 ,
  fTarGExecute = 00010 , fTarORead = 00004 , fTarOWrite = 00002 , fTarOExecute = 00001
}
 TTarMode –. More...
 
enum  CTarException::EErrCode {
  CTarException::eUnsupportedTarFormat , CTarException::eUnsupportedEntryType , CTarException::eUnsupportedSource , CTarException::eNameTooLong ,
  CTarException::eChecksum , CTarException::eBadName , CTarException::eCreate , CTarException::eOpen ,
  CTarException::eRead , CTarException::eWrite , CTarException::eBackup , CTarException::eMemory ,
  CTarException::eRestoreAttrs
}
 Error types that file operations can generate. More...
 
enum  CTarEntryInfo::EType {
  CTarEntryInfo::eFile = CDirEntry::eFile , CTarEntryInfo::eDir = CDirEntry::eDir , CTarEntryInfo::eSymLink = CDirEntry::eSymLink , CTarEntryInfo::ePipe = CDirEntry::ePipe ,
  CTarEntryInfo::eCharDev = CDirEntry::eCharSpecial , CTarEntryInfo::eBlockDev = CDirEntry::eBlockSpecial , CTarEntryInfo::eUnknown = CDirEntry::eUnknown , CTarEntryInfo::eHardLink ,
  CTarEntryInfo::eVolHeader , CTarEntryInfo::ePAXHeader , CTarEntryInfo::eSparseFile , CTarEntryInfo::eGNULongName ,
  CTarEntryInfo::eGNULongLink
}
 Archive entry type. More...
 
enum  CTarEntryInfo::EPos { CTarEntryInfo::ePos_Header , CTarEntryInfo::ePos_Data }
 Position type. More...
 
enum  CTar::EFlags {
  CTar::fIgnoreZeroBlocks = (1<<1) , CTar::fFollowLinks = (1<<2) , CTar::fOverwrite = (1<<3) , CTar::fUpdate = (1<<4) | fOverwrite ,
  CTar::fBackup = (1<<5) | fOverwrite , CTar::fEqualTypes = (1<<6) , CTar::fPreserveOwner = (1<<7) , CTar::fPreserveMode = (1<<8) ,
  CTar::fPreserveTime = (1<<9) , CTar::fPreserveAll = fPreserveOwner | fPreserveMode | fPreserveTime , CTar::fKeepAbsolutePath = (1<<12) , CTar::fSparseUnsupported = (1<<13) ,
  CTar::fSkipUnsupported = (1<<15) , CTar::fIgnoreUnreadable = (1<<17) , CTar::fLongNameSupplement = (1<<18) , CTar::fDumpEntryHeaders = (1<<20) ,
  CTar::fSlowSkipWithRead = (1<<21) , CTar::fStreamPipeThrough = (1<<24) , CTar::fTarfileNoTruncate = (1<<26) , CTar::fStandardHeaderOnly = (1<<28) ,
  CTar::fDefault = fOverwrite | fPreserveAll
}
 General flags. More...
 
enum  CTar::EMaskType { CTar::eExtractMask = 0 , CTar::eExcludeMask }
 
enum  CTar::EOpenMode { CTar::eNone = 0 , CTar::eWO = 1 , CTar::eRO = 2 , CTar::eRW = eRO | eWO }
 Archive open mode and action. More...
 
enum  CTar::EAction {
  CTar::eUndefined = eNone , CTar::eList = (1 << 2) | eRO , CTar::eAppend = (1 << 3) | eRW , CTar::eUpdate = eList | eAppend ,
  CTar::eExtract = (1 << 4) | eRO , CTar::eTest = eList | eExtract , CTar::eCreate = (1 << 5) | eWO , CTar::eInternal = (1 << 6) | eRO
}
 
enum  CTar::EStatus {
  CTar::eFailure = -1 , CTar::eSuccess = 0 , CTar::eContinue , CTar::eZeroBlock ,
  CTar::eEOF
}
 I/O completion code. More...
 
enum  CZipCompression::EFlags {
  CZipCompression::fAllowTransparentRead = (1<<0) , CZipCompression::fAllowEmptyData = (1<<1) , CZipCompression::fCheckFileHeader = (1<<2) , CZipCompression::fWriteGZipFormat = (1<<3) ,
  CZipCompression::fAllowConcatenatedGZip = (1<<4) , CZipCompression::fGZip = fCheckFileHeader | fWriteGZipFormat | fAllowConcatenatedGZip , CZipCompression::fRestoreFileAttr = (1<<5)
}
 Compression/decompression flags. More...
 
enum  CZipCloudflareCompression::EFlags {
  CZipCloudflareCompression::fAllowTransparentRead = (1<<0) , CZipCloudflareCompression::fAllowEmptyData = (1<<1) , CZipCloudflareCompression::fCheckFileHeader = (1<<2) , CZipCloudflareCompression::fWriteGZipFormat = (1<<3) ,
  CZipCloudflareCompression::fAllowConcatenatedGZip = (1<<4) , CZipCloudflareCompression::fGZip = fCheckFileHeader | fWriteGZipFormat | fAllowConcatenatedGZip , CZipCloudflareCompression::fRestoreFileAttr = (1<<5)
}
 Compression/decompression flags. More...
 

Functions

 CArchive::CArchive (EFormat format)
 Construct an archive object of specified format. More...
 
virtual CArchive::~CArchive (void)
 Destructor. More...
 
virtual void CArchive::Create (void)
 Create a new empty archive. More...
 
virtual void CArchive::Close (void)
 Close the archive making sure all pending output is flushed. More...
 
virtual unique_ptr< TEntriesCArchive::List (void)
 Get information about archive entries. More...
 
virtual unique_ptr< TEntriesCArchive::Test (void)
 Verify archive integrity. More...
 
virtual unique_ptr< TEntriesCArchive::Extract (void)
 Extract the entire archive. More...
 
virtual void CArchive::ExtractFileToMemory (const CArchiveEntryInfo &info, void *buf, size_t buf_size, size_t *out_size)
 Extract single file entry to a memory buffer. More...
 
virtual void CArchive::ExtractFileToHeap (const CArchiveEntryInfo &info, void **buf_ptr, size_t *buf_size_ptr)
 Extract single file entry to a dynamically allocated memory buffer. More...
 
virtual void CArchive::ExtractFileToCallback (const CArchiveEntryInfo &info, IArchive::Callback_Write callback)
 Extract single file entry using user-defined callback. More...
 
virtual unique_ptr< TEntriesCArchive::Append (const string &path, ELevel level=CCompression::eLevel_Default, const string &comment=kEmptyStr)
 Append an entry to the archive. More...
 
virtual unique_ptr< CArchive::TEntriesCArchive::AppendFileFromMemory (const string &name_in_archive, void *buf, size_t buf_size, ELevel level=CCompression::eLevel_Default, const string &comment=kEmptyStr)
 Append a single file entry to the created archive using data from memory buffer. More...
 
virtual TFlags CArchive::GetFlags (void) const
 Get flags. More...
 
virtual void CArchive::SetFlags (TFlags flags)
 Set flags. More...
 
virtual const stringCArchive::GetBaseDir (void) const
 Get base directory to use for files while extracting from/adding to the archive, and in the latter case used only for relative paths. More...
 
virtual void CArchive::SetBaseDir (const string &dirname)
 Set base directory to use for files while extracting from/adding to the archive, and in the latter case used only for relative paths. More...
 
void CArchive::SetMask (CMask *mask, EOwnership own=eNoOwnership, EMaskType type=eFullPathMask, NStr::ECase acase=NStr::eNocase)
 Set name mask for processing. More...
 
void CArchive::UnsetMask (EMaskType type)
 Unset name mask for processing. More...
 
void CArchive::UnsetMask (void)
 
bool CArchive::HaveSupport (ESupportFeature feature, int param=0)
 Check that current archive format have support for specific features. More...
 
 CArchive::SMask::SMask (void)
 
virtual bool CArchive::Checkpoint (const CArchiveEntryInfo &, EAction)
 Return false to skip the current entry when processing. More...
 
virtual void CArchive::Open (EAction action)=0
 Open archive. More...
 
virtual void CArchive::SkipEntry (void)
 Process current entry (List/Test/Extract/Append) More...
 
virtual void CArchive::TestEntry (void)
 
virtual void CArchive::ExtractEntry (const CDirEntry &dst)
 
virtual void CArchive::AppendEntry (const string &path, ELevel level)
 
void CArchive::x_Open (EAction action)
 
unique_ptr< TEntriesCArchive::x_ReadAndProcess (EAction action)
 
unique_ptr< TEntriesCArchive::x_Append (const string &path, ELevel level, const string &comment, const TEntries *toc=NULL)
 
bool CArchive::x_AppendEntry (const string &path, ELevel level=CCompression::eLevel_Default)
 
void CArchive::x_ExtractEntry (const TEntries *prev_entries)
 
void CArchive::x_RestoreAttrs (const CArchiveEntryInfo &info, const CDirEntry *dst=NULL) const
 
CArchiveCArchive::operator= (const CArchive &)
 
 CArchive::CArchive (const CArchive &)
 
 CArchiveFile::CArchiveFile (EFormat format, const string &filename)
 Constructor for file-based archive. More...
 
virtual void CArchiveFile::Open (EAction action)
 Open the archive for specified action. More...
 
CArchiveFileCArchiveFile::operator= (const CArchiveFile &)
 
 CArchiveFile::CArchiveFile (const CArchiveFile &)
 
 CArchiveMemory::CArchiveMemory (EFormat format, const void *buf=NULL, size_t buf_size=0)
 Constructor for memory-based archive. More...
 
virtual void CArchiveMemory::Create (size_t initial_allocation_size)
 Create a new empty archive in memory. More...
 
virtual void CArchiveMemory::Create (void)
 Create a new empty archive. More...
 
void CArchiveMemory::Save (const string &filename)
 Save current opened/created archive to file. More...
 
void CArchiveMemory::Load (const string &filename)
 Load existing archive from file system to memory. More...
 
virtual void CArchiveMemory::Finalize (void **buf_ptr, size_t *buf_size_ptr)
 Finalize the archive created in memory. More...
 
virtual void CArchiveMemory::Open (EAction action)
 Open the archive for specified action. More...
 
CArchiveMemoryCArchiveMemory::operator= (const CArchiveMemory &)
 
 CArchiveMemory::CArchiveMemory (const CArchiveMemory &)
 
 CArchiveCompressionFileStream::CArchiveCompressionFileStream (EFormat format, int fd)
 Constructor for stream-based archive. More...
 
 CArchiveCompressionFileStream::CArchiveCompressionFileStream (EFormat format, FILE *filestream)
 Create new archive on a base of already opened FILE* stream, beginning at the current FILE* position. More...
 
virtual CArchiveCompressionFileStream::~CArchiveCompressionFileStream (void)
 Destructor. More...
 
virtual void CArchiveCompressionFileStream::Create (void)
 Create a new empty archive. More...
 
virtual void CArchiveCompressionFileStream::Close (void)
 Close archive. More...
 
virtual void CArchiveCompressionFileStream::Open (EAction action)
 Open the archive for specified action. More...
 
CArchiveCompressionFileStreamCArchiveCompressionFileStream::operator= (const CArchiveCompressionFileStream &)
 
 CArchiveCompressionFileStream::CArchiveCompressionFileStream (const CArchiveCompressionFileStream &)
 
virtual const char * CArchiveException::GetErrCodeString (void) const override
 Translate from an error code value to its string representation. More...
 
 CArchiveException::NCBI_EXCEPTION_DEFAULT (CArchiveException, CCoreException)
 
 CArchiveEntryInfo::CArchiveEntryInfo ()
 
void CArchiveEntryInfo::Reset (void)
 
CDirEntry::EType CArchiveEntryInfo::GetType (void) const
 
const stringCArchiveEntryInfo::GetName (void) const
 
const stringCArchiveEntryInfo::GetLinkName (void) const
 
const stringCArchiveEntryInfo::GetUserName (void) const
 
const stringCArchiveEntryInfo::GetGroupName (void) const
 
const stringCArchiveEntryInfo::GetComment (void) const
 
size_t CArchiveEntryInfo::GetIndex (void) const
 
time_t CArchiveEntryInfo::GetModificationTime (void) const
 
time_t CArchiveEntryInfo::GetLastAccessTime (void) const
 
time_t CArchiveEntryInfo::GetCreationTime (void) const
 
Uint8 CArchiveEntryInfo::GetSize (void) const
 
mode_t CArchiveEntryInfo::GetMode (void) const
 
void CArchiveEntryInfo::GetMode (CDirEntry::TMode *user_mode, CDirEntry::TMode *group_mode=0, CDirEntry::TMode *other_mode=0, CDirEntry::TSpecialModeBits *special_bits=0) const
 
unsigned int CArchiveEntryInfo::GetMajor (void) const
 
unsigned int CArchiveEntryInfo::GetMinor (void) const
 
unsigned int CArchiveEntryInfo::GetUserId (void) const
 
unsigned int CArchiveEntryInfo::GetGroupId (void) const
 
bool CArchiveEntryInfo::operator== (const CArchiveEntryInfo &info) const
 
ostream & operator<< (ostream &, const CArchiveEntryInfo &)
 Nice TOC (table of contents) printout. More...
 
virtual IArchive::~IArchive (void)
 
virtual void IArchive::CreateFile (const string &filename)=0
 Create new archive file. More...
 
virtual void IArchive::CreateFileStream (FILE *filestream)=0
 Create new archive file on top of a FILE stream. More...
 
virtual void IArchive::CreateMemory (size_t initial_allocation_size=0)=0
 Create new archive located in memory. More...
 
virtual void IArchive::OpenFile (const string &filename)=0
 Open archive file for reading. More...
 
virtual void IArchive::OpenFileStream (FILE *filestream, Uint8 archive_size=0)=0
 Open archive from a FILE stream, beginning at the current file position. More...
 
virtual void IArchive::OpenMemory (const void *buf, size_t size)=0
 Open archive located in memory for reading. More...
 
virtual void IArchive::Close (void)=0
 Close the archive. More...
 
virtual void IArchive::FinalizeMemory (void **buf, size_t *size)=0
 Finalize the archive created in memory. More...
 
virtual size_t IArchive::GetNumEntries (void)=0
 Returns the total number of entries in the archive. More...
 
virtual void IArchive::GetEntryInfo (size_t index, CArchiveEntryInfo *info)=0
 Get detailed information about an archive entry by index. More...
 
virtual bool IArchive::HaveSupport_Type (CDirEntry::EType type)=0
 Check that current archive format have support for specific feature. More...
 
virtual bool IArchive::HaveSupport_AbsolutePath (void)=0
 
virtual bool IArchive::HaveSupport_FileStream (void)=0
 
virtual void IArchive::ExtractEntryToFileSystem (const CArchiveEntryInfo &info, const string &dst_path)=0
 Extracts an archive entry to file system. More...
 
virtual void IArchive::ExtractEntryToMemory (const CArchiveEntryInfo &info, void *buf, size_t size)=0
 Extracts an archive file to a memory buffer. More...
 
virtual void IArchive::ExtractEntryToCallback (const CArchiveEntryInfo &info, Callback_Write callback)=0
 Extracts an archive file using user-defined callback to process extracted data. More...
 
virtual void IArchive::TestEntry (const CArchiveEntryInfo &info)=0
 Verify entry integrity. More...
 
virtual void IArchive::SkipEntry (const CArchiveEntryInfo &info)=0
 Don't need to be implemented for ZIP format. More...
 
virtual void IArchive::AddEntryFromFileSystem (const CArchiveEntryInfo &info, const string &src_path, ELevel level)=0
 Add single entry to newly created archive from file system. More...
 
virtual void IArchive::AddEntryFromMemory (const CArchiveEntryInfo &info, void *buf, size_t size, ELevel level)=0
 Add entry to newly created archive from memory buffer. More...
 
static bool CBZip2Compression::Initialize (void)
 Initialize compression library (for API compatibility, bz2 don't need it). More...
 
 CBZip2Compression::CBZip2Compression (ELevel level=eLevel_Default)
 Constructor. More...
 
virtual CBZip2Compression::~CBZip2Compression (void)
 Destructor. More...
 
virtual CVersionInfo CBZip2Compression::GetVersion (void) const
 Return name and version of the compression library. More...
 
virtual ELevel CBZip2Compression::GetLevel (void) const
 Get compression level. More...
 
virtual ELevel CBZip2Compression::GetDefaultLevel (void) const
 Return default compression level for a compression algorithm. More...
 
virtual bool CBZip2Compression::HaveSupport (ESupportFeature feature)
 Check if compression have support for a specified feature. More...
 
virtual bool CBZip2Compression::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 CBZip2Compression::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 CBZip2Compression::EstimateCompressionBufferSize (size_t)
 
static SRecommendedBufferSizes CBZip2Compression::GetRecommendedBufferSizes (size_t round_up=0)
 Get recommended buffer sizes for stream/file I/O. More...
 
virtual bool CBZip2Compression::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 CBZip2Compression::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 CBZip2Compression::SetDictionary (CCompressionDictionary &dict, ENcbiOwnership own=eNoOwnership)
 
void CBZip2Compression::SetWorkFactor (int work_factor)
 Work factor. More...
 
int CBZip2Compression::GetWorkFactor (void) const
 
static int CBZip2Compression::GetWorkFactorDefault (void)
 
static int CBZip2Compression::GetWorkFactorMin (void)
 
static int CBZip2Compression::GetWorkFactorMax (void)
 
void CBZip2Compression::SetSmallDecompress (bool small_decompres)
 Small decompress. More...
 
bool CBZip2Compression::GetSmallDecompress (void) const
 
static bool CBZip2Compression::GetSmallDecompressDefault (void)
 
const char * CBZip2Compression::GetBZip2ErrorDescription (int errcode)
 Get error description for specified error code. More...
 
string CBZip2Compression::FormatErrorMessage (string where, bool use_stream_data=true) const
 Format string with last error description. More...
 
 CBZip2Compression::CBZip2Compression (const CBZip2Compression &)
 Private copy constructor to prohibit copy. More...
 
CBZip2CompressionCBZip2Compression::operator= (const CBZip2Compression &)
 Private assignment operator to prohibit assignment. More...
 
 CBZip2CompressionFile::CBZip2CompressionFile (const string &file_name, EMode mode, ELevel level=eLevel_Default)
 Constructor. More...
 
 CBZip2CompressionFile::CBZip2CompressionFile (ELevel level=eLevel_Default)
 Conventional constructor. More...
 
 CBZip2CompressionFile::~CBZip2CompressionFile (void)
 Destructor. More...
 
virtual bool CBZip2CompressionFile::Open (const string &file_name, EMode mode, size_t compression_in_bufsize=kCompressionDefaultBufSize, size_t compression_out_bufsize=kCompressionDefaultBufSize)
 Opens a compressed file for reading or writing. More...
 
virtual long CBZip2CompressionFile::Read (void *buf, size_t len)
 Read data from compressed file. More...
 
virtual long CBZip2CompressionFile::Write (const void *buf, size_t len)
 Write data to compressed file. More...
 
virtual bool CBZip2CompressionFile::Close (void)
 Close compressed file. More...
 
 CBZip2CompressionFile::CBZip2CompressionFile (const CBZip2CompressionFile &)
 Private copy constructor to prohibit copy. More...
 
CBZip2CompressionFileCBZip2CompressionFile::operator= (const CBZip2CompressionFile &)
 Private assignment operator to prohibit assignment. More...
 
 CBZip2Compressor::CBZip2Compressor (ELevel level=eLevel_Default, TBZip2Flags flags=0)
 Constructor. More...
 
virtual CBZip2Compressor::~CBZip2Compressor (void)
 Destructor. More...
 
virtual bool CBZip2Compressor::AllowEmptyData () const
 Return TRUE if fAllowEmptyData flag is set. More...
 
virtual EStatus CBZip2Compressor::Init (void)
 Initialize the internal stream state for compression/decompression. More...
 
virtual EStatus CBZip2Compressor::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 CBZip2Compressor::Flush (char *out_buf, size_t out_size, size_t *out_avail)
 Flush compressed/decompressed data from the output buffer. More...
 
virtual EStatus CBZip2Compressor::Finish (char *out_buf, size_t out_size, size_t *out_avail)
 Finish the compression/decompression process. More...
 
virtual EStatus CBZip2Compressor::End (int abandon=0)
 Free all dynamically allocated data structures. More...
 
 CBZip2Decompressor::CBZip2Decompressor (TBZip2Flags flags=0)
 Constructor. More...
 
virtual CBZip2Decompressor::~CBZip2Decompressor (void)
 Destructor. More...
 
virtual bool CBZip2Decompressor::AllowEmptyData () const
 Return TRUE if fAllowEmptyData flag is set. More...
 
virtual EStatus CBZip2Decompressor::Init (void)
 Initialize the internal stream state for compression/decompression. More...
 
virtual EStatus CBZip2Decompressor::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 CBZip2Decompressor::Flush (char *out_buf, size_t out_size, size_t *out_avail)
 Flush compressed/decompressed data from the output buffer. More...
 
virtual EStatus CBZip2Decompressor::Finish (char *out_buf, size_t out_size, size_t *out_avail)
 Finish the compression/decompression process. More...
 
virtual EStatus CBZip2Decompressor::End (int abandon=0)
 Free all dynamically allocated data structures. More...
 
 CBZip2StreamCompressor::CBZip2StreamCompressor (CBZip2Compression::ELevel level, streamsize in_bufsize, streamsize out_bufsize, CBZip2Compression::TBZip2Flags flags=0)
 Full constructor. More...
 
 CBZip2StreamCompressor::CBZip2StreamCompressor (CBZip2Compression::ELevel level, CBZip2Compression::TBZip2Flags flags=0)
 Conventional constructor. More...
 
 CBZip2StreamCompressor::CBZip2StreamCompressor (CBZip2Compression::TBZip2Flags flags=0)
 Conventional constructor. More...
 
CBZip2CompressorCBZip2StreamCompressor::GetCompressor (void) const
 Return a pointer to compressor. More...
 
 CBZip2StreamDecompressor::CBZip2StreamDecompressor (streamsize in_bufsize, streamsize out_bufsize, CBZip2Compression::TBZip2Flags flags=0)
 Full constructor. More...
 
 CBZip2StreamDecompressor::CBZip2StreamDecompressor (CBZip2Compression::TBZip2Flags flags=0)
 Conventional constructor. More...
 
CBZip2DecompressorCBZip2StreamDecompressor::GetDecompressor (void) const
 Return a pointer to compressor. More...
 
virtual ICompression::~ICompression (void)
 Destructor. More...
 
virtual CVersionInfo ICompression::GetVersion (void) const =0
 Return name and version of the compression library. More...
 
virtual void ICompression::SetLevel (ELevel level)=0
 
virtual ELevel ICompression::GetLevel (void) const =0
 
virtual ELevel ICompression::GetDefaultLevel (void) const =0
 Return the default compression level for current compression algorithm. More...
 
virtual int ICompression::GetErrorCode (void) const =0
 
virtual string ICompression::GetErrorDescription (void) const =0
 
virtual TFlags ICompression::GetFlags (void) const =0
 
virtual void ICompression::SetFlags (TFlags flags)=0
 
virtual bool ICompression::HaveSupport (ESupportFeature feature)=0
 Check if compression have support for a specified feature. More...
 
virtual bool ICompression::CompressBuffer (const void *src_buf, size_t src_len, void *dst_buf, size_t dst_size, size_t *dst_len)=0
 (De)compress the source buffer into the destination buffer. More...
 
virtual bool ICompression::DecompressBuffer (const void *src_buf, size_t src_len, void *dst_buf, size_t dst_size, size_t *dst_len)=0
 
virtual size_t ICompression::EstimateCompressionBufferSize (size_t src_len)=0
 Estimate buffer size for data compression (if supported). More...
 
virtual bool ICompression::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)=0
 (De)compress file "src_file" and put result to file "dst_file". More...
 
virtual bool ICompression::DecompressFile (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)=0
 
virtual bool ICompression::SetDictionary (CCompressionDictionary &dict, ENcbiOwnership own=eNoOwnership)=0
 Set a dictionary for all compression/decompression operations (if supported). More...
 
 CCompression::CCompression (ELevel level=eLevel_Default)
 
virtual CCompression::~CCompression (void)
 
virtual CVersionInfo CCompression::GetVersion (void) const =0
 Return name and version of the compression library. More...
 
virtual void CCompression::SetLevel (ELevel level)
 Get/set compression level. More...
 
virtual ELevel CCompression::GetLevel (void) const
 
virtual int CCompression::GetErrorCode (void) const
 Get compressor's internal status/error code and description for the last operation. More...
 
virtual string CCompression::GetErrorDescription (void) const
 
virtual TFlags CCompression::GetFlags (void) const
 Get/set flags. More...
 
virtual void CCompression::SetFlags (TFlags flags)
 
size_t CCompression::SRecommendedBufferSizes::RoundUp (size_t value, size_t precision)
 
void CCompression::SetError (int status, const char *description=0)
 Set last action error/status code and description. More...
 
void CCompression::SetError (int status, const string &description)
 
virtual bool CCompression::x_CompressFile (const string &src_file, CCompressionFile &dst_file, size_t file_io_bufsize=kCompressionDefaultBufSize)
 Universal file compression function. More...
 
virtual bool CCompression::x_DecompressFile (CCompressionFile &src_file, const string &dst_file, size_t file_io_bufsize=kCompressionDefaultBufSize)
 Universal file decompression function. More...
 
 CCompressionFile::CCompressionFile (void)
 
 CCompressionFile::CCompressionFile (const string &path, EMode mode, size_t compression_in_bufsize=0, size_t compression_out_bufsize=0)
 
virtual CCompressionFile::~CCompressionFile (void)
 
virtual bool CCompressionFile::Open (const string &path, EMode mode, size_t compression_in_bufsize=0, size_t compression_out_bufsize=0)=0
 Opens a compressed file for reading or writing. More...
 
virtual long CCompressionFile::Read (void *buf, size_t len)=0
 Read up to "len" uncompressed bytes from the compressed file "file" into the buffer "buf". More...
 
virtual long CCompressionFile::Write (const void *buf, size_t len)=0
 Writes the given number of uncompressed bytes into the compressed file. More...
 
virtual bool CCompressionFile::Close (void)=0
 Flushes all pending output if necessary, closes the compressed file. More...
 
 CCompressionDictionary::CCompressionDictionary (const void *buf, size_t size, ENcbiOwnership own=eNoOwnership)
 Use dictionary data from a memory buffer. More...
 
 CCompressionDictionary::CCompressionDictionary (const string &filename)
 Load a dictionary from file. More...
 
 CCompressionDictionary::CCompressionDictionary (istream &is, size_t size)
 Load a dictionary up to 'size' bytes from a stream 'is'. More...
 
virtual CCompressionDictionary::~CCompressionDictionary (void)
 Destructor. More...
 
const void * CCompressionDictionary::GetData (void)
 Return pointer to the dictionary data. More...
 
size_t CCompressionDictionary::GetSize (void)
 Return dictionary data size. More...
 
void CCompressionDictionary::Free (void)
 Free used memory. More...
 
size_t CCompressionDictionary::LoadFromStream (istream &is, size_t size)
 
 CCompressionProcessor::CCompressionProcessor (void)
 
virtual CCompressionProcessor::~CCompressionProcessor (void)
 
bool CCompressionProcessor::IsBusy (void) const
 Return compressor's busy flag. More...
 
virtual bool CCompressionProcessor::AllowEmptyData () const =0
 Return TRUE if fAllowEmptyData flag is set for this compression. More...
 
size_t CCompressionProcessor::GetProcessedSize (void)
 
size_t CCompressionProcessor::GetOutputSize (void)
 
virtual EStatus CCompressionProcessor::Init (void)=0
 Initialize the internal stream state for compression/decompression. More...
 
virtual EStatus CCompressionProcessor::Process (const char *in_buf, size_t in_len, char *out_buf, size_t out_size, size_t *in_avail, size_t *out_avail)=0
 Compress/decompress as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. More...
 
virtual EStatus CCompressionProcessor::Flush (char *out_buf, size_t out_size, size_t *out_avail)=0
 Flush compressed/decompressed data from the output buffer. More...
 
virtual EStatus CCompressionProcessor::Finish (char *out_buf, size_t out_size, size_t *out_avail)=0
 Finish the compression/decompression process. More...
 
virtual EStatus CCompressionProcessor::End (int abandon=0)=0
 Free all dynamically allocated data structures. More...
 
void CCompressionProcessor::Reset (void)
 Reset internal state. More...
 
void CCompressionProcessor::SetBusy (bool busy=true)
 Set/unset compressor busy flag. More...
 
void CCompressionProcessor::IncreaseProcessedSize (size_t n_bytes)
 
void CCompressionProcessor::IncreaseOutputSize (size_t n_bytes)
 
virtual const char * CCompressionException::GetErrCodeString (void) const override
 Translate from the error code value to its string representation. More...
 
 CCompressionException::NCBI_EXCEPTION_DEFAULT (CCompressionException, CCoreException)
 
static void CCompressionUtil::StoreUI4 (void *buf, unsigned long value)
 Store 4 bytes of value in the buffer. More...
 
static Uint4 CCompressionUtil::GetUI4 (const void *buf)
 Read 4 bytes from buffer. More...
 
static void CCompressionUtil::StoreUI2 (void *buf, unsigned long value)
 Store 2 bytes of value in the buffer. More...
 
static Uint2 CCompressionUtil::GetUI2 (const void *buf)
 Read 2 bytes from buffer. More...
 
virtual IChunkHandler::~IChunkHandler (void)
 Destructor. More...
 
virtual EAction IChunkHandler::OnChunk (TPosition raw_pos, TPosition data_pos)=0
 Callback method, to be implemented by the end user. More...
 
static bool CLZOCompression::Initialize (void)
 Initialize LZO library. More...
 
 CLZOCompression::CLZOCompression (ELevel level=eLevel_Default)
 Constructor. More...
 
virtual CLZOCompression::~CLZOCompression (void)
 Destructor. More...
 
virtual CVersionInfo CLZOCompression::GetVersion (void) const
 Return name and version of the compression library. More...
 
virtual ELevel CLZOCompression::GetLevel (void) const
 Get compression level. More...
 
virtual ELevel CLZOCompression::GetDefaultLevel (void) const
 Returns default compression level for a compression algorithm. More...
 
virtual bool CLZOCompression::HaveSupport (ESupportFeature feature)
 Check if compression have support for a specified feature. More...
 
virtual bool CLZOCompression::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 CLZOCompression::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 CLZOCompression::EstimateCompressionBufferSize (size_t src_len)
 Estimate buffer size for data compression. More...
 
static size_t CLZOCompression::EstimateCompressionBufferSize (size_t src_len, size_t blocksize, TLZOFlags flags)
 Estimate buffer size for data compression (advanced version). More...
 
static SRecommendedBufferSizes CLZOCompression::GetRecommendedBufferSizes (size_t round_up=0)
 Get recommended buffer sizes for stream/file I/O. More...
 
virtual bool CLZOCompression::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 CLZOCompression::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...
 
 CLZOCompression::SFileInfo::SFileInfo (void)
 
virtual bool CLZOCompression::SetDictionary (CCompressionDictionary &dict, ENcbiOwnership own=eNoOwnership)
 
void CLZOCompression::SetBlockSize (size_t block_size)
 Block size. More...
 
size_t CLZOCompression::GetBlockSize (void) const
 
static size_t CLZOCompression::GetBlockSizeDefault (void)
 We use 24K default block size to reduce overhead with a stream processor's methods calls, because compression/decompression output streams use by default (16Kb - 1) as output buffer size. More...
 
static size_t CLZOCompression::GetBlockSizeMin (void)
 This is an artifical limit. More...
 
static size_t CLZOCompression::GetBlockSizeMax (void)
 LZO can compress/decompress data limited by its 'lzo_uint' type. More...
 
void CLZOCompression::InitCompression (ELevel level)
 Initialize compression parameters. More...
 
const char * CLZOCompression::GetLZOErrorDescription (int errcode)
 Get error description for specified error code. More...
 
string CLZOCompression::FormatErrorMessage (string where) const
 Format string with last error description. More...
 
int CLZOCompression::CompressBlock (const void *src_buf, size_t src_len, void *dst_buf, size_t *dst_len)
 Compress block of data. More...
 
int CLZOCompression::CompressBlockStream (const void *src_buf, size_t src_len, void *dst_buf, size_t *dst_len)
 Compress block of data for stream format (fStreamFormat flag). More...
 
int CLZOCompression::DecompressBlock (const void *src_buf, size_t src_len, void *dst_buf, size_t *dst_len, TLZOFlags flags)
 Decompress block of data. More...
 
int CLZOCompression::DecompressBlockStream (const void *src_buf, size_t src_len, void *dst_buf, size_t *dst_len, TLZOFlags flags, size_t *processed)
 Decompress block of data for stream format (fStreamFormat flag). More...
 
 CLZOCompression::CLZOCompression (const CLZOCompression &)
 Private copy constructor to prohibit copy. More...
 
CLZOCompressionCLZOCompression::operator= (const CLZOCompression &)
 Private assignment operator to prohibit assignment. More...
 
 CLZOCompressionFile::CLZOCompressionFile (const string &file_name, EMode mode, ELevel level=eLevel_Default)
 Constructor. More...
 
 CLZOCompressionFile::CLZOCompressionFile (ELevel level=eLevel_Default)
 Conventional constructor. More...
 
 CLZOCompressionFile::~CLZOCompressionFile (void)
 Destructor. More...
 
virtual bool CLZOCompressionFile::Open (const string &file_name, EMode mode, size_t compression_in_bufsize=kCompressionDefaultBufSize, size_t compression_out_bufsize=kCompressionDefaultBufSize)
 Opens a compressed file for reading or writing. More...
 
virtual bool CLZOCompressionFile::Open (const string &file_name, EMode mode, SFileInfo *info, size_t compression_in_bufsize=kCompressionDefaultBufSize, size_t compression_out_bufsize=kCompressionDefaultBufSize)
 Opens a compressed file for reading or writing. More...
 
virtual long CLZOCompressionFile::Read (void *buf, size_t len)
 Read data from compressed file. More...
 
virtual long CLZOCompressionFile::Write (const void *buf, size_t len)
 Write data to compressed file. More...
 
virtual bool CLZOCompressionFile::Close (void)
 Close compressed file. More...
 
void CLZOCompressionFile::GetStreamError (void)
 Get error code/description of last stream operation (m_Stream). More...
 
 CLZOCompressionFile::CLZOCompressionFile (const CLZOCompressionFile &)
 Private copy constructor to prohibit copy. More...
 
CLZOCompressionFileCLZOCompressionFile::operator= (const CLZOCompressionFile &)
 Private assignment operator to prohibit assignment. More...
 
 CLZOBuffer::CLZOBuffer (void)
 Constructor. More...
 
void CLZOBuffer::ResetBuffer (size_t in_bufsize, size_t out_bufsize)
 Reset internal state. More...
 
 CLZOBuffer::CLZOBuffer (const CLZOBuffer &)
 Private copy constructor to prohibit copy. More...
 
CLZOBufferCLZOBuffer::operator= (const CLZOBuffer &)
 Private assignment operator to prohibit assignment. More...
 
 CLZOCompressor::CLZOCompressor (ELevel level=eLevel_Default, TLZOFlags flags=0)
 Constructor. More...
 
virtual CLZOCompressor::~CLZOCompressor (void)
 Destructor. More...
 
virtual bool CLZOCompressor::AllowEmptyData () const
 Return TRUE if fAllowEmptyData flag is set. More...
 
void CLZOCompressor::SetFileInfo (const SFileInfo &info)
 Set information about compressed file. More...
 
virtual EStatus CLZOCompressor::Init (void)
 Initialize the internal stream state for compression/decompression. More...
 
virtual EStatus CLZOCompressor::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 CLZOCompressor::Flush (char *out_buf, size_t out_size, size_t *out_avail)
 Flush compressed/decompressed data from the output buffer. More...
 
virtual EStatus CLZOCompressor::Finish (char *out_buf, size_t out_size, size_t *out_avail)
 Finish the compression/decompression process. More...
 
virtual EStatus CLZOCompressor::End (int abandon=0)
 Free all dynamically allocated data structures. More...
 
bool CLZOCompressor::CompressCache (void)
 Compress block of data in the cache buffer. More...
 
 CLZODecompressor::CLZODecompressor (TLZOFlags flags)
 Constructor. More...
 
virtual CLZODecompressor::~CLZODecompressor (void)
 Destructor. More...
 
virtual bool CLZODecompressor::AllowEmptyData () const
 Return TRUE if fAllowEmptyData flag is set. More...
 
virtual EStatus CLZODecompressor::Init (void)
 Initialize the internal stream state for compression/decompression. More...
 
virtual EStatus CLZODecompressor::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 CLZODecompressor::Flush (char *out_buf, size_t out_size, size_t *out_avail)
 Flush compressed/decompressed data from the output buffer. More...
 
virtual EStatus CLZODecompressor::Finish (char *out_buf, size_t out_size, size_t *out_avail)
 Finish the compression/decompression process. More...
 
virtual EStatus CLZODecompressor::End (int abandon=0)
 Free all dynamically allocated data structures. More...
 
bool CLZODecompressor::DecompressCache (void)
 Decompress block of data in the cache buffer. More...
 
 CLZOStreamCompressor::CLZOStreamCompressor (CLZOCompression::ELevel level, streamsize in_bufsize, streamsize out_bufsize, CLZOCompression::TLZOFlags flags=0)
 Full constructor. More...
 
 CLZOStreamCompressor::CLZOStreamCompressor (CLZOCompression::ELevel level, CLZOCompression::TLZOFlags flags=0)
 Conventional constructor. More...
 
 CLZOStreamCompressor::CLZOStreamCompressor (CLZOCompression::TLZOFlags flags=0)
 Conventional constructor. More...
 
CLZOCompressorCLZOStreamCompressor::GetCompressor (void) const
 Return a pointer to compressor. More...
 
 CLZOStreamDecompressor::CLZOStreamDecompressor (streamsize in_bufsize, streamsize out_bufsize, CLZOCompression::TLZOFlags flags=0)
 Full constructor. More...
 
 CLZOStreamDecompressor::CLZOStreamDecompressor (CLZOCompression::TLZOFlags flags=0)
 Conventional constructor. More...
 
CLZODecompressorCLZOStreamDecompressor::GetDecompressor (void) const
 Return a pointer to decompressor. More...
 
 CNlmZipBtRdr::CNlmZipBtRdr (CByteSourceReader *src)
 
 CNlmZipBtRdr::~CNlmZipBtRdr ()
 
virtual size_t CNlmZipBtRdr::Read (char *buffer, size_t bufferLength)
 Read up to bufferLength bytes into buffer return amount of bytes read (if zero - see EndOfData()) More...
 
virtual bool CNlmZipBtRdr::Pushback (const char *data, size_t size)
 
 CNlmZipBtRdr::CNlmZipBtRdr (const CNlmZipBtRdr &)
 
const CNlmZipBtRdrCNlmZipBtRdr::operator= (const CNlmZipBtRdr &)
 
 CDynamicCharArray::CDynamicCharArray (void)
 
 CDynamicCharArray::CDynamicCharArray (size_t size)
 
 CDynamicCharArray::~CDynamicCharArray (void)
 
char * CDynamicCharArray::At (size_t pos) const
 
char * CDynamicCharArray::Alloc (size_t size)
 
 CDynamicCharArray::CDynamicCharArray (const CDynamicCharArray &)
 
void CDynamicCharArray::operator= (const CDynamicCharArray &)
 
 CNlmZipReader::CNlmZipReader (IReader *reader, TOwnership own=fOwnNone, EHeader header=eHeaderCheck)
 
 CNlmZipReader::~CNlmZipReader (void)
 
virtual ERW_Result CNlmZipReader::Read (void *buf, size_t count, size_t *bytes_read=0)
 Read as many as "count" bytes into a buffer pointed to by the "buf" argument. More...
 
virtual ERW_Result CNlmZipReader::PendingCount (size_t *count)
 Via parameter "count" (which is guaranteed to be supplied non-NULL) return the number of bytes that are ready to be read from the input device without blocking. More...
 
void CNlmZipReader::x_StartPlain (void)
 
void CNlmZipReader::x_StartDecompressor (void)
 
size_t CNlmZipReader::x_ReadZipHeader (char *buffer)
 
ERW_Result CNlmZipReader::x_DecompressBuffer (void)
 
ERW_Result CNlmZipReader::x_Read (char *buffer, size_t count, size_t *bytes_read)
 
 CNlmZipReader::CNlmZipReader (const CNlmZipReader &)
 
const CNlmZipReaderCNlmZipReader::operator= (const CNlmZipReader &)
 
virtual const char * CTarException::GetErrCodeString (void) const override
 Translate from an error code value to its string representation. More...
 
 CTarException::NCBI_EXCEPTION_DEFAULT (CTarException, CCoreException)
 
EType CTarEntryInfo::GetType (void) const
 
const stringCTarEntryInfo::GetName (void) const
 
const stringCTarEntryInfo::GetLinkName (void) const
 
const stringCTarEntryInfo::GetUserName (void) const
 
const stringCTarEntryInfo::GetGroupName (void) const
 
time_t CTarEntryInfo::GetModificationTime (void) const
 
CTime CTarEntryInfo::GetModificationCTime (void) const
 
time_t CTarEntryInfo::GetLastAccessTime (void) const
 
CTime CTarEntryInfo::GetLastAccessCTime (void) const
 
time_t CTarEntryInfo::GetCreationTime (void) const
 
CTime CTarEntryInfo::GetCreationCTime (void) const
 
Uint8 CTarEntryInfo::GetSize (void) const
 
TTarMode CTarEntryInfo::GetMode (void) const
 
void CTarEntryInfo::GetMode (CDirEntry::TMode *user_mode, CDirEntry::TMode *group_mode=0, CDirEntry::TMode *other_mode=0, CDirEntry::TSpecialModeBits *special_bits=0) const
 
unsigned int CTarEntryInfo::GetMajor (void) const
 
unsigned int CTarEntryInfo::GetMinor (void) const
 
unsigned int CTarEntryInfo::GetUserId (void) const
 
unsigned int CTarEntryInfo::GetGroupId (void) const
 
Uint8 CTarEntryInfo::GetPosition (EPos which) const
 
bool CTarEntryInfo::operator== (const CTarEntryInfo &info) const
 
 CTarEntryInfo::CTarEntryInfo (Uint8 pos=0)
 
 CTarUserEntryInfo::CTarUserEntryInfo (const string &name, Uint8 size)
 
ostream & operator<< (ostream &, const CTarEntryInfo &)
 Nice TOC(table of contents) printout. More...
 
 CTar::CTar (const string &filename, size_t blocking_factor=20)
 Constructors. More...
 
 CTar::CTar (CNcbiIos &stream, size_t blocking_factor=20)
 Stream version does not at all use stream positioning and so is safe on non-positionable streams, like pipes/sockets (or magnetic tapes :-I). More...
 
virtual CTar::~CTar ()
 Destructor (finalize the archive if currently open). More...
 
void CTar::Create (void)
 Create a new empty archive. More...
 
void CTar::Close (void)
 Close the archive making sure all pending output is flushed. More...
 
unique_ptr< TEntriesCTar::Append (const string &name)
 Append an entry at the end of the archive that already exists. More...
 
unique_ptr< TEntriesCTar::Append (const CTarUserEntryInfo &entry, CNcbiIstream &is)
 Append an entry from a stream (exactly entry.GetSize() bytes). More...
 
unique_ptr< TEntriesCTar::Update (const string &name)
 Look whether more recent copies of the archive members are available in the file system, and if so, append them to the archive: More...
 
unique_ptr< TEntriesCTar::Extract (void)
 Extract the entire archive (into either current directory or a directory otherwise specified by SetBaseDir()). More...
 
unique_ptr< TEntriesCTar::List (void)
 Get information about all matching archive entries. More...
 
void CTar::Test (void)
 Verify archive integrity. More...
 
TFlags CTar::GetFlags (void) const
 Get processing flags. More...
 
void CTar::SetFlags (TFlags flags)
 Set processing flags. More...
 
Uint8 CTar::GetCurrentPosition (void) const
 Get current stream position. More...
 
void CTar::SetMask (CMask *mask, EOwnership own=eNoOwnership, EMaskType type=eExtractMask, NStr::ECase acase=NStr::eCase)
 Set name mask. More...
 
const stringCTar::GetBaseDir (void) const
 Get base directory to use for files while extracting from/adding to the archive, and in the latter case used only for relative paths. More...
 
void CTar::SetBaseDir (const string &dirname)
 Set base directory to use for files while extracting from/adding to the archive, and in the latter case used only for relative paths. More...
 
static Uint8 CTar::EstimateArchiveSize (const TFiles &files, size_t blocking_factor=20, const string &base_dir=kEmptyStr)
 Return archive size as if all specified input entries were put in it. More...
 
const CTarEntryInfoCTar::GetNextEntryInfo (void)
 Iterate over the archive forward and return first (or next) entry. More...
 
IReaderCTar::GetNextEntryData (void)
 Create and return an IReader, which can extract the current archive entry that has been previously returned via GetNextEntryInfo. More...
 
static IReaderCTar::Extract (CNcbiIstream &is, const string &name, TFlags flags=fSkipUnsupported)
 Create and return an IReader, which can extract contents of one named file (which can be requested by a name mask in the "name" parameter). More...
 
virtual bool CTar::Checkpoint (const CTarEntryInfo &, bool)
 Return false to skip the current entry when reading; the return code gets ignored when writing. More...
 
 CTar::SMask::SMask (void)
 
void CTar::x_Init (void)
 
void CTar::x_Open (EAction action)
 
void CTar::x_Close (bool truncate)
 
bool CTar::x_Flush (bool nothrow=false)
 
void CTar::x_Backspace (EAction action)
 
void CTar::x_Skip (Uint8 blocks)
 
EStatus CTar::x_ParsePAXData (const string &data)
 
EStatus CTar::x_ReadEntryInfo (bool dump, bool pax)
 
bool CTar::x_PackCurrentName (STarHeader *header, bool link)
 
void CTar::x_WriteEntryInfo (const string &name)
 
unique_ptr< TEntriesCTar::x_ReadAndProcess (EAction action)
 
bool CTar::x_ProcessEntry (EAction action, Uint8 size, const TEntries *done)
 
bool CTar::x_ExtractEntry (Uint8 &size, const CDirEntry *dst, const CDirEntry *src)
 
void CTar::x_ExtractPlainFile (Uint8 &size, const CDirEntry *dst)
 
bool CTar::x_ExtractSparseFile (Uint8 &size, const CDirEntry *dst, bool dump=false)
 
void CTar::x_RestoreAttrs (const CTarEntryInfo &info, TFlags what, const CDirEntry *path=0, TTarMode perm=0) const
 
string CTar::x_ReadLine (Uint8 &size, const char *&data, size_t &nread)
 
const char * CTar::x_ReadArchive (size_t &n)
 
void CTar::x_WriteArchive (size_t n, const char *buffer=0)
 
unique_ptr< TEntriesCTar::x_Append (const string &name, const TEntries *toc=0)
 
unique_ptr< TEntriesCTar::x_Append (const CTarUserEntryInfo &entry, CNcbiIstream &is)
 
void CTar::x_AppendStream (const string &name, CNcbiIstream &is)
 
bool CTar::x_AppendFile (const string &file)
 
CTarCTar::operator= (const CTar &)
 
 CTar::CTar (const CTar &)
 
static bool CZipCompression::Initialize (void)
 Initialize compression library (for API compatibility, zlib don't need it). More...
 
 CZipCompression::CZipCompression (ELevel level=eLevel_Default)
 Constructor. More...
 
virtual CZipCompression::~CZipCompression (void)
 Destructor. More...
 
virtual CVersionInfo CZipCompression::GetVersion (void) const
 Return name and version of the compression library. More...
 
virtual ELevel CZipCompression::GetDefaultLevel (void) const
 Returns default compression level for a compression algorithm. More...
 
virtual bool CZipCompression::HaveSupport (ESupportFeature feature)
 Check if compression have support for a specified feature. More...
 
virtual bool CZipCompression::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 CZipCompression::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 CZipCompression::EstimateCompressionBufferSize (size_t src_len)
 Estimate buffer size for data compression. More...
 
static SRecommendedBufferSizes CZipCompression::GetRecommendedBufferSizes (size_t round_up=0)
 Get recommended buffer sizes for stream/file I/O. More...
 
virtual bool CZipCompression::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 CZipCompression::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 CZipCompression::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...
 
 CZipCompression::SFileInfo::SFileInfo (void)
 
virtual bool CZipCompression::SetDictionary (CCompressionDictionary &dict, ENcbiOwnership own=eNoOwnership)
 Set a dictionary for all compression/decompression operations. More...
 
void CZipCompression::SetStrategy (int strategy)
 Compression strategy. More...
 
int CZipCompression::GetStrategy (void) const
 
static int CZipCompression::GetStrategyDefault (void)
 
static int CZipCompression::GetStrategyMin (void)
 
static int CZipCompression::GetStrategyMax (void)
 
void CZipCompression::SetMemoryLevel (int mem_level)
 Memory level. More...
 
int CZipCompression::GetMemoryLevel (void) const
 
static int CZipCompression::GetMemoryLevelDefault (void)
 
static int CZipCompression::GetMemoryLevelMin (void)
 
static int CZipCompression::GetMemoryLevelMax (void)
 
void CZipCompression::SetWindowBits (int window_bits)
 Window bits. More...
 
int CZipCompression::GetWindowBits (void) const
 
static int CZipCompression::GetWindowBitsDefault (void)
 
static int CZipCompression::GetWindowBitsMin (void)
 
static int CZipCompression::GetWindowBitsMax (void)
 
string CZipCompression::FormatErrorMessage (string where, size_t pos=0) const
 Format string with last error description. More...
 
 CZipCompression::CZipCompression (const CZipCompression &)
 Private copy constructor to prohibit copy. More...
 
CZipCompressionCZipCompression::operator= (const CZipCompression &)
 Private assignment operator to prohibit assignment. More...
 
 CZipCompressionFile::CZipCompressionFile (const string &file_name, EMode mode, ELevel level=eLevel_Default)
 Constructor. More...
 
 CZipCompressionFile::CZipCompressionFile (ELevel level=eLevel_Default)
 Conventional constructor. More...
 
 CZipCompressionFile::~CZipCompressionFile (void)
 Destructor. More...
 
virtual bool CZipCompressionFile::Open (const string &file_name, EMode mode, size_t compression_in_bufsize=kCompressionDefaultBufSize, size_t compression_out_bufsize=kCompressionDefaultBufSize)
 Opens a compressed file for reading or writing. More...
 
virtual bool CZipCompressionFile::Open (const string &file_name, EMode mode, SFileInfo *info, size_t compression_in_bufsize=kCompressionDefaultBufSize, size_t compression_out_bufsize=kCompressionDefaultBufSize)
 Opens a compressed file for reading or writing. More...
 
virtual long CZipCompressionFile::Read (void *buf, size_t len)
 Read data from compressed file. More...
 
virtual long CZipCompressionFile::Write (const void *buf, size_t len)
 Write data to compressed file. More...
 
virtual bool CZipCompressionFile::Close (void)
 Close compressed file. More...
 
void CZipCompressionFile::GetStreamError (void)
 Get error code/description of last stream operation (m_Stream). More...
 
 CZipCompressionFile::CZipCompressionFile (const CZipCompressionFile &)
 Private copy constructor to prohibit copy. More...
 
CZipCompressionFileCZipCompressionFile::operator= (const CZipCompressionFile &)
 Private assignment operator to prohibit assignment. More...
 
 CZipCompressor::CZipCompressor (ELevel level=eLevel_Default, TZipFlags flags=0)
 Constructor. More...
 
virtual CZipCompressor::~CZipCompressor (void)
 Destructor. More...
 
void CZipCompressor::SetFileInfo (const SFileInfo &info)
 Set information about compressed file. More...
 
virtual bool CZipCompressor::AllowEmptyData () const
 Return TRUE if fAllowEmptyData flag is set. More...
 
virtual EStatus CZipCompressor::Init (void)
 Initialize the internal stream state for compression/decompression. More...
 
virtual EStatus CZipCompressor::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 CZipCompressor::Flush (char *out_buf, size_t out_size, size_t *out_avail)
 Flush compressed/decompressed data from the output buffer. More...
 
virtual EStatus CZipCompressor::Finish (char *out_buf, size_t out_size, size_t *out_avail)
 Finish the compression/decompression process. More...
 
virtual EStatus CZipCompressor::End (int abandon=0)
 Free all dynamically allocated data structures. More...
 
 CZipDecompressor::CZipDecompressor (TZipFlags flags=0)
 Constructor. More...
 
virtual CZipDecompressor::~CZipDecompressor (void)
 Destructor. More...
 
virtual bool CZipDecompressor::AllowEmptyData () const
 Return TRUE if fAllowEmptyData flag is set. More...
 
virtual EStatus CZipDecompressor::Init (void)
 Initialize the internal stream state for compression/decompression. More...
 
virtual EStatus CZipDecompressor::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 CZipDecompressor::Flush (char *out_buf, size_t out_size, size_t *out_avail)
 Flush compressed/decompressed data from the output buffer. More...
 
virtual EStatus CZipDecompressor::Finish (char *out_buf, size_t out_size, size_t *out_avail)
 Finish the compression/decompression process. More...
 
virtual EStatus CZipDecompressor::End (int abandon=0)
 Free all dynamically allocated data structures. More...
 
 CZipStreamCompressor::CZipStreamCompressor (CZipCompression::ELevel level, streamsize in_bufsize, streamsize out_bufsize, CZipCompression::TZipFlags flags=0)
 Full constructor. More...
 
 CZipStreamCompressor::CZipStreamCompressor (CZipCompression::ELevel level, CZipCompression::TZipFlags flags=0)
 Conventional constructor. More...
 
 CZipStreamCompressor::CZipStreamCompressor (CZipCompression::TZipFlags flags=0)
 Conventional constructor. More...
 
CZipCompressorCZipStreamCompressor::GetCompressor (void) const
 Return a pointer to compressor. More...
 
 CZipStreamDecompressor::CZipStreamDecompressor (streamsize in_bufsize, streamsize out_bufsize, CZipCompression::TZipFlags flags=0)
 Full constructor. More...
 
 CZipStreamDecompressor::CZipStreamDecompressor (CZipCompression::TZipFlags flags=0)
 Conventional constructor. More...
 
CZipDecompressorCZipStreamDecompressor::GetDecompressor (void) const
 Return a pointer to decompressor. More...
 
void g_GZip_ScanForChunks (CNcbiIstream &is, IChunkHandler &handler)
 Get list of positions of separate gzip files in the concatenated gzip file. More...
 
static bool CZipCloudflareCompression::Initialize (void)
 Initialize compression library (for API compatibility, zlib don't need it). More...
 
 CZipCloudflareCompression::CZipCloudflareCompression (ELevel level=eLevel_Default)
 Constructor. More...
 
virtual CZipCloudflareCompression::~CZipCloudflareCompression (void)
 Destructor. More...
 
virtual CVersionInfo CZipCloudflareCompression::GetVersion (void) const
 Return name and version of the compression library. More...
 
virtual ELevel CZipCloudflareCompression::GetDefaultLevel (void) const
 Returns default compression level for a compression algorithm. More...
 
virtual bool CZipCloudflareCompression::HaveSupport (ESupportFeature feature)
 Check if compression have support for a specified feature. More...
 
virtual bool CZipCloudflareCompression::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 CZipCloudflareCompression::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 CZipCloudflareCompression::EstimateCompressionBufferSize (size_t src_len)
 Estimate buffer size for data compression. More...
 
static SRecommendedBufferSizes CZipCloudflareCompression::GetRecommendedBufferSizes (size_t round_up=0)
 Get recommended buffer sizes for stream/file I/O. More...
 
virtual bool CZipCloudflareCompression::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 CZipCloudflareCompression::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 CZipCloudflareCompression::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...
 
 CZipCloudflareCompression::SFileInfo::SFileInfo (void)
 
virtual bool CZipCloudflareCompression::SetDictionary (CCompressionDictionary &dict, ENcbiOwnership own=eNoOwnership)
 Set a dictionary for all compression/decompression operations. More...
 
void CZipCloudflareCompression::SetStrategy (int strategy)
 Compression strategy. More...
 
int CZipCloudflareCompression::GetStrategy (void) const
 
static int CZipCloudflareCompression::GetStrategyDefault (void)
 
static int CZipCloudflareCompression::GetStrategyMin (void)
 
static int CZipCloudflareCompression::GetStrategyMax (void)
 
void CZipCloudflareCompression::SetMemoryLevel (int mem_level)
 Memory level. More...
 
int CZipCloudflareCompression::GetMemoryLevel (void) const
 
static int CZipCloudflareCompression::GetMemoryLevelDefault (void)
 
static int CZipCloudflareCompression::GetMemoryLevelMin (void)
 
static int CZipCloudflareCompression::GetMemoryLevelMax (void)
 
void CZipCloudflareCompression::SetWindowBits (int window_bits)
 Window bits. More...
 
int CZipCloudflareCompression::GetWindowBits (void) const
 
static int CZipCloudflareCompression::GetWindowBitsDefault (void)
 
static int CZipCloudflareCompression::GetWindowBitsMin (void)
 
static int CZipCloudflareCompression::GetWindowBitsMax (void)
 
string CZipCloudflareCompression::FormatErrorMessage (string where, size_t pos=0) const
 Format string with last error description. More...
 
 CZipCloudflareCompression::CZipCloudflareCompression (const CZipCloudflareCompression &)
 Private copy constructor to prohibit copy. More...
 
CZipCloudflareCompressionCZipCloudflareCompression::operator= (const CZipCloudflareCompression &)
 Private assignment operator to prohibit assignment. More...
 
 CZipCloudflareCompressionFile::CZipCloudflareCompressionFile (const string &file_name, EMode mode, ELevel level=eLevel_Default)
 Constructor. More...
 
 CZipCloudflareCompressionFile::CZipCloudflareCompressionFile (ELevel level=eLevel_Default)
 Conventional constructor. More...
 
 CZipCloudflareCompressionFile::~CZipCloudflareCompressionFile (void)
 Destructor. More...
 
virtual bool CZipCloudflareCompressionFile::Open (const string &file_name, EMode mode, size_t compression_in_bufsize=kCompressionDefaultBufSize, size_t compression_out_bufsize=kCompressionDefaultBufSize)
 Opens a compressed file for reading or writing. More...
 
virtual bool CZipCloudflareCompressionFile::Open (const string &file_name, EMode mode, SFileInfo *info, size_t compression_in_bufsize=kCompressionDefaultBufSize, size_t compression_out_bufsize=kCompressionDefaultBufSize)
 Opens a compressed file for reading or writing. More...
 
virtual long CZipCloudflareCompressionFile::Read (void *buf, size_t len)
 Read data from compressed file. More...
 
virtual long CZipCloudflareCompressionFile::Write (const void *buf, size_t len)
 Write data to compressed file. More...
 
virtual bool CZipCloudflareCompressionFile::Close (void)
 Close compressed file. More...
 
void CZipCloudflareCompressionFile::GetStreamError (void)
 Get error code/description of last stream operation (m_Stream). More...
 
 CZipCloudflareCompressionFile::CZipCloudflareCompressionFile (const CZipCloudflareCompressionFile &)
 Private copy constructor to prohibit copy. More...
 
CZipCloudflareCompressionFileCZipCloudflareCompressionFile::operator= (const CZipCloudflareCompressionFile &)
 Private assignment operator to prohibit assignment. More...
 
 CZipCloudflareCompressor::CZipCloudflareCompressor (ELevel level=eLevel_Default, TZipFlags flags=0)
 Constructor. More...
 
virtual CZipCloudflareCompressor::~CZipCloudflareCompressor (void)
 Destructor. More...
 
void CZipCloudflareCompressor::SetFileInfo (const SFileInfo &info)
 Set information about compressed file. More...
 
virtual bool CZipCloudflareCompressor::AllowEmptyData () const
 Return TRUE if fAllowEmptyData flag is set. More...
 
virtual EStatus CZipCloudflareCompressor::Init (void)
 Initialize the internal stream state for compression/decompression. More...
 
virtual EStatus CZipCloudflareCompressor::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 CZipCloudflareCompressor::Flush (char *out_buf, size_t out_size, size_t *out_avail)
 Flush compressed/decompressed data from the output buffer. More...
 
virtual EStatus CZipCloudflareCompressor::Finish (char *out_buf, size_t out_size, size_t *out_avail)
 Finish the compression/decompression process. More...
 
virtual EStatus CZipCloudflareCompressor::End (int abandon=0)
 Free all dynamically allocated data structures. More...
 
 CZipCloudflareDecompressor::CZipCloudflareDecompressor (TZipFlags flags=0)
 Constructor. More...
 
virtual CZipCloudflareDecompressor::~CZipCloudflareDecompressor (void)
 Destructor. More...
 
virtual bool CZipCloudflareDecompressor::AllowEmptyData () const
 Return TRUE if fAllowEmptyData flag is set. More...
 
virtual EStatus CZipCloudflareDecompressor::Init (void)
 Initialize the internal stream state for compression/decompression. More...
 
virtual EStatus CZipCloudflareDecompressor::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 CZipCloudflareDecompressor::Flush (char *out_buf, size_t out_size, size_t *out_avail)
 Flush compressed/decompressed data from the output buffer. More...
 
virtual EStatus CZipCloudflareDecompressor::Finish (char *out_buf, size_t out_size, size_t *out_avail)
 Finish the compression/decompression process. More...
 
virtual EStatus CZipCloudflareDecompressor::End (int abandon=0)
 Free all dynamically allocated data structures. More...
 
 CZipCloudflareStreamCompressor::CZipCloudflareStreamCompressor (CZipCloudflareCompression::ELevel level, streamsize in_bufsize, streamsize out_bufsize, CZipCloudflareCompression::TZipFlags flags=0)
 Full constructor. More...
 
 CZipCloudflareStreamCompressor::CZipCloudflareStreamCompressor (CZipCloudflareCompression::ELevel level, CZipCloudflareCompression::TZipFlags flags=0)
 Conventional constructor. More...
 
 CZipCloudflareStreamCompressor::CZipCloudflareStreamCompressor (CZipCloudflareCompression::TZipFlags flags=0)
 Conventional constructor. More...
 
CZipCloudflareCompressorCZipCloudflareStreamCompressor::GetCompressor (void) const
 Return a pointer to compressor. More...
 
 CZipCloudflareStreamDecompressor::CZipCloudflareStreamDecompressor (streamsize in_bufsize, streamsize out_bufsize, CZipCloudflareCompression::TZipFlags flags=0)
 Full constructor. More...
 
 CZipCloudflareStreamDecompressor::CZipCloudflareStreamDecompressor (CZipCloudflareCompression::TZipFlags flags=0)
 Conventional constructor. More...
 
CZipCloudflareDecompressorCZipCloudflareStreamDecompressor::GetDecompressor (void) const
 Return a pointer to decompressor. More...
 
void g_GZip_Cloudflare_ScanForChunks (CNcbiIstream &is, IChunkHandler &handler)
 Get list of positions of separate gzip files in the concatenated gzip file. More...
 
 CArchiveZip::CArchiveZip (void)
 Constructor. More...
 
virtual CArchiveZip::~CArchiveZip (void)
 Destructor. More...
 
virtual void CArchiveZip::CreateFile (const string &filename)
 Create new archive file. More...
 
virtual void CArchiveZip::CreateFileStream (FILE *filestream)
 Create new archive file on top of a FILE stream. More...
 
virtual void CArchiveZip::CreateMemory (size_t initial_allocation_size=0)
 Create new archive located in memory. More...
 
virtual void CArchiveZip::OpenFile (const string &filename)
 Open archive file for reading. More...
 
virtual void CArchiveZip::OpenFileStream (FILE *filestream, Uint8 archive_size=0)
 Open archive from a FILE stream, beginning at the current file position. More...
 
virtual void CArchiveZip::OpenMemory (const void *buf, size_t size)
 Open archive located in memory for reading. More...
 
virtual void CArchiveZip::Close (void)
 Close the archive. More...
 
virtual void CArchiveZip::FinalizeMemory (void **buf, size_t *size)
 Finalize the archive created in memory. More...
 
virtual size_t CArchiveZip::GetNumEntries (void)
 Returns the total number of entries in the archive. More...
 
virtual void CArchiveZip::GetEntryInfo (size_t index, CArchiveEntryInfo *info)
 Get detailed information about an archive entry by index. More...
 
virtual bool CArchiveZip::HaveSupport_Type (CDirEntry::EType type)
 Check that current archive format have support for specific feature. More...
 
virtual bool CArchiveZip::HaveSupport_AbsolutePath (void)
 
virtual bool CArchiveZip::HaveSupport_FileStream (void)
 
virtual void CArchiveZip::ExtractEntryToFileSystem (const CArchiveEntryInfo &info, const string &dst_path)
 Extracts an archive entry to file system. More...
 
virtual void CArchiveZip::ExtractEntryToMemory (const CArchiveEntryInfo &info, void *buf, size_t size)
 Extracts an archive file to a memory buffer. More...
 
virtual void CArchiveZip::ExtractEntryToCallback (const CArchiveEntryInfo &info, Callback_Write callback)
 Extracts an archive file using user-defined callback to process extracted data. More...
 
virtual void CArchiveZip::TestEntry (const CArchiveEntryInfo &info)
 Verify entry integrity. More...
 
virtual void CArchiveZip::SkipEntry (const CArchiveEntryInfo &)
 Don't need to be implemented for ZIP format. More...
 
virtual void CArchiveZip::AddEntryFromFileSystem (const CArchiveEntryInfo &info, const string &src_path, ELevel level)
 Add single entry to newly created archive from file system. More...
 
virtual void CArchiveZip::AddEntryFromMemory (const CArchiveEntryInfo &info, void *buf, size_t size, ELevel level)
 Add entry to newly created archive from memory buffer. More...
 

Variables

CMaskCArchive::SMask::mask
 
NStr::ECase CArchive::SMask::acase
 
EOwnership CArchive::SMask::owned
 
unique_ptr< IArchiveCArchive::m_Archive
 Pointer to interface to EFormat-specific archive support. More...
 
EFormat CArchive::m_Format
 Archive format. More...
 
IArchive::ELocation CArchive::m_Location
 Archive location (file/memory) More...
 
TFlags CArchive::m_Flags
 Bitwise OR of flags. More...
 
string CArchive::m_BaseDir
 Base directory for relative paths. More...
 
CArchiveEntryInfo CArchive::m_Current
 Information about current entry being processed. More...
 
SMask CArchive::m_MaskFullPath
 Set of masks for operations (full path) More...
 
SMask CArchive::m_MaskPattern
 Set of masks for operations (path components) More...
 
EOpenMode CArchive::m_OpenMode
 What was it opened for. More...
 
bool CArchive::m_Modified
 True after at least one write. More...
 
string CArchiveFile::m_FileName
 Archive file name. More...
 
const void * CArchiveMemory::m_Buf
 Buffer where the opening archive is located. More...
 
size_t CArchiveMemory::m_BufSize
 Size of m_Buf. More...
 
AutoArray< char > CArchiveMemory::m_OwnBuf
 Holder for the pointer to memory buffer that will be automatically deallocated if we own it (used for Load() only). More...
 
size_t CArchiveMemory::m_InitialAllocationSize
 < Initial allocation size for created archive More...
 
FILE * CArchiveCompressionFileStream::m_FileStream
 File stream, can be based on m_fd. More...
 
int CArchiveCompressionFileStream::m_fd
 File/socket descriptor. More...
 
size_t CArchiveEntryInfo::m_Index
 Entry index in the archive. More...
 
TNcbiSys_stat CArchiveEntryInfo::m_Stat
 Direntry-compatible info (as applicable) More...
 
CDirEntry::EType CArchiveEntryInfo::m_Type
 Type. More...
 
string CArchiveEntryInfo::m_Name
 Entry name. More...
 
string CArchiveEntryInfo::m_LinkName
 Link name if type is eLink. More...
 
string CArchiveEntryInfo::m_UserName
 User name. More...
 
string CArchiveEntryInfo::m_GroupName
 Group name. More...
 
string CArchiveEntryInfo::m_Comment
 Entry comment. More...
 
Uint8 CArchiveEntryInfo::m_CompressedSize
 Compressed size. More...
 
EDirection IArchive::m_Mode
 Processing direction (read/write) More...
 
ELocation IArchive::m_Location
 Archive location (file/memory) More...
 
void * CBZip2Compression::m_Stream
 Compressor stream. More...
 
int CBZip2Compression::m_c_WorkFactor
 See description above. More...
 
int CBZip2Compression::m_d_SmallDecompress
 Use memory-frugal decompression algorithm. More...
 
FILE * CBZip2CompressionFile::m_FileStream
 Underlying file stream. More...
 
bool CBZip2CompressionFile::m_EOF
 EOF flag for read mode. More...
 
bool CBZip2CompressionFile::m_HaveData
 Flag that we read/write some data. More...
 
const streamsize kCompressionDefaultBufSize = 16*1024
 Default compression I/O stream buffer size. More...
 
size_t CCompression::SRecommendedBufferSizes::compression_in
 compression: recommended size for input buffer More...
 
size_t CCompression::SRecommendedBufferSizes::compression_out
 compression: recommended size for output buffer More...
 
size_t CCompression::SRecommendedBufferSizes::decompression_in
 decompression: recommended size for input buffer More...
 
size_t CCompression::SRecommendedBufferSizes::decompression_out
 decompression: recommended size for output buffer More...
 
EDecompressMode CCompression::m_DecompressMode
 Decompress mode (Decompress/TransparentRead/Unknown) More...
 
CCompressionDictionaryCCompression::m_Dict
 Dictionary for compression/decompression. More...
 
ENcbiOwnership CCompression::m_DictOwn
 Dictionary ownership. More...
 
ELevel CCompression::m_Level
 Compression level. More...
 
int CCompression::m_ErrorCode
 Last compressor action error/status. More...
 
string CCompression::m_ErrorMsg
 Last compressor action error message. More...
 
TFlags CCompression::m_Flags
 Bitwise OR of flags. More...
 
TFile CCompressionFile::m_File
 File handler. More...
 
EMode CCompressionFile::m_Mode
 File open mode. More...
 
const void * CCompressionDictionary::m_Data
 Pointer to the dictionary data. More...
 
size_t CCompressionDictionary::m_Size
 Size of the data. More...
 
ENcbiOwnership CCompressionDictionary::m_Own
 Data ownership. More...
 
size_t CCompressionProcessor::m_ProcessedSize
 
size_t CCompressionProcessor::m_OutputSize
 
bool CCompressionProcessor::m_Busy
 
const size_t kLZODefaultBlockSize = 24*1024
 Default LZO block size. More...
 
string CLZOCompression::SFileInfo::name
 
string CLZOCompression::SFileInfo::comment
 
time_t CLZOCompression::SFileInfo::mtime
 
size_t CLZOCompression::m_BlockSize
 Block size for (de)compression. More...
 
AutoArray< char > CLZOCompression::m_WorkMem
 Working memory for compressor. More...
 
unique_ptr< SCompressionParamCLZOCompression::m_Param
 Compression parameters. More...
 
EMode CLZOCompressionFile::m_Mode
 I/O mode (read/write). More...
 
CNcbiFstreamCLZOCompressionFile::m_File
 File stream. More...
 
CCompressionIOStreamCLZOCompressionFile::m_Stream
 [De]compression stream. More...
 
size_t CLZOBuffer::m_Size
 Size of in/out buffers. More...
 
AutoArray< char > CLZOBuffer::m_Buf
 Buffer for caching (size of m_Size*2). More...
 
char * CLZOBuffer::m_InBuf
 Pointer to input buffer. More...
 
size_t CLZOBuffer::m_InSize
 Size of the input buffer. More...
 
size_t CLZOBuffer::m_InLen
 Length of data in the input buffer. More...
 
char * CLZOBuffer::m_OutBuf
 Pointer to output buffer. More...
 
size_t CLZOBuffer::m_OutSize
 Size of the output buffer. More...
 
char * CLZOBuffer::m_OutBegPtr
 Pointer to begin of data in out buffer. More...
 
char * CLZOBuffer::m_OutEndPtr
 Pointer to end of data in out buffer. More...
 
bool CLZOCompressor::m_NeedWriteHeader
 TRUE if needed to write a header. More...
 
SFileInfo CLZOCompressor::m_FileInfo
 Compressed file info. More...
 
size_t CLZODecompressor::m_BlockLen
 Length of the compressed data in the block. More...
 
string CLZODecompressor::m_Cache
 Buffer to cache header. More...
 
size_t CLZODecompressor::m_HeaderLen
 Length of the header. More...
 
TLZOFlags CLZODecompressor::m_HeaderFlags
 Flags used for compression. More...
 
CRef< CByteSourceReaderCNlmZipBtRdr::m_Src
 
EType CNlmZipBtRdr::m_Type
 
unique_ptr< CResultZBtSrcXCNlmZipBtRdr::m_Decompressor
 
size_t CDynamicCharArray::m_Size
 
char * CDynamicCharArray::m_Array
 
IReaderCNlmZipReader::m_Reader
 
TOwnership CNlmZipReader::m_Own
 
EHeader CNlmZipReader::m_Header
 
CDynamicCharArray CNlmZipReader::m_Buffer
 
size_t CNlmZipReader::m_BufferPos
 
size_t CNlmZipReader::m_BufferEnd
 
unique_ptr< CZipCompressionCNlmZipReader::m_Decompressor
 
CDynamicCharArray CNlmZipReader::m_Compressed
 
EType CTarEntryInfo::m_Type
 Type. More...
 
string CTarEntryInfo::m_Name
 Entry name. More...
 
string CTarEntryInfo::m_LinkName
 Link name if type is e{Sym|Hard}Link. More...
 
string CTarEntryInfo::m_UserName
 User name. More...
 
string CTarEntryInfo::m_GroupName
 Group name. More...
 
streamsize CTarEntryInfo::m_HeaderSize
 Total size of all headers for the entry. More...
 
CDirEntry::SStat CTarEntryInfo::m_Stat
 Direntry-compatible info. More...
 
Uint8 CTarEntryInfo::m_Pos
 Entry (not data!) position in archive. More...
 
CMaskCTar::SMask::mask
 
NStr::ECase CTar::SMask::acase
 
EOwnership CTar::SMask::owned
 
string CTar::m_FileName
 Tar archive file name (only if file) More...
 
CNcbiFstreamCTar::m_FileStream
 File stream of the archive (if file) More...
 
CNcbiIosCTar::m_Stream
 Archive stream (used for all I/O) More...
 
size_t CTar::m_ZeroBlockCount
 Zero blocks seen in between entries. More...
 
const size_t CTar::m_BufferSize
 Buffer(record) size for I/O operations. More...
 
size_t CTar::m_BufferPos
 Position within the record. More...
 
Uint8 CTar::m_StreamPos
 Position in stream (0-based) More...
 
char * CTar::m_BufPtr
 Page-unaligned buffer pointer. More...
 
char * CTar::m_Buffer
 I/O buffer (page-aligned) More...
 
SMask CTar::m_Mask [2]
 Entry masks for operations. More...
 
EOpenMode CTar::m_OpenMode
 What was it opened for. More...
 
bool CTar::m_Modified
 True after at least one write. More...
 
bool CTar::m_Bad
 True if a fatal output error occurred. More...
 
TFlags CTar::m_Flags
 Bitwise OR of flags. More...
 
string CTar::m_BaseDir
 Base directory for relative paths. More...
 
CTarEntryInfo CTar::m_Current
 Current entry being processed. More...
 
const int kZlibDefaultWbits = -1
 
const int kZlibDefaultMemLevel = -1
 
const int kZlibDefaultStrategy = -1
 
const int kZlibDefaultCompression = -1
 
string CZipCompression::SFileInfo::name
 
string CZipCompression::SFileInfo::comment
 
time_t CZipCompression::SFileInfo::mtime
 
void * CZipCompression::m_Stream
 Compressor stream. More...
 
int CZipCompression::m_cd_WindowBits
 The base two logarithm of the window size. More...
 
int CZipCompression::m_c_MemLevel
 The allocation memory level for the compression. More...
 
int CZipCompression::m_c_Strategy
 The parameter to tune up a compression algorithm. More...
 
EMode CZipCompressionFile::m_Mode
 I/O mode (read/write). More...
 
CNcbiFstreamCZipCompressionFile::m_File
 File stream. More...
 
CCompressionIOStreamCZipCompressionFile::m_Stream
 [De]comression stream. More...
 
unsigned long CZipCompressor::m_CRC32
 CRC32 for compressed data. More...
 
string CZipCompressor::m_Cache
 Buffer to cache small pieces of data. More...
 
bool CZipCompressor::m_NeedWriteHeader
 Is true if needed to write a file header. More...
 
SFileInfo CZipCompressor::m_FileInfo
 Compressed file info. More...
 
bool CZipDecompressor::m_NeedCheckHeader
 TRUE if needed to check to file header. More...
 
bool CZipDecompressor::m_IsGZ
 TRUE if data have gzip format. More...
 
size_t CZipDecompressor::m_SkipInput
 Number of bytes to skip from input stream. More...
 
string CZipDecompressor::m_Cache
 Buffer to cache small pieces of data. More...
 
string CZipCloudflareCompression::SFileInfo::name
 
string CZipCloudflareCompression::SFileInfo::comment
 
time_t CZipCloudflareCompression::SFileInfo::mtime
 
void * CZipCloudflareCompression::m_Stream
 Compressor stream. More...
 
int CZipCloudflareCompression::m_cd_WindowBits
 The base two logarithm of the window size. More...
 
int CZipCloudflareCompression::m_c_MemLevel
 The allocation memory level for the compression. More...
 
int CZipCloudflareCompression::m_c_Strategy
 The parameter to tune up a compression algorithm. More...
 
EMode CZipCloudflareCompressionFile::m_Mode
 I/O mode (read/write). More...
 
CNcbiFstreamCZipCloudflareCompressionFile::m_File
 File stream. More...
 
CCompressionIOStreamCZipCloudflareCompressionFile::m_Stream
 [De]comression stream. More...
 
unsigned long CZipCloudflareCompressor::m_CRC32
 CRC32 for compressed data. More...
 
string CZipCloudflareCompressor::m_Cache
 Buffer to cache small pieces of data. More...
 
bool CZipCloudflareCompressor::m_NeedWriteHeader
 Is true if needed to write a file header. More...
 
SFileInfo CZipCloudflareCompressor::m_FileInfo
 Compressed file info. More...
 
bool CZipCloudflareDecompressor::m_NeedCheckHeader
 TRUE if needed to check to file header. More...
 
bool CZipCloudflareDecompressor::m_IsGZ
 TRUE if data have gzip format. More...
 
size_t CZipCloudflareDecompressor::m_SkipInput
 Number of bytes to skip from input stream. More...
 
string CZipCloudflareDecompressor::m_Cache
 Buffer to cache small pieces of data. More...
 
SZipHandleCArchiveZip::m_Handle
 Archive handle. More...
 

Friends

class CArchiveEntryInfo::CArchive
 
class CArchiveEntryInfo::CArchiveZip
 
class CCompression::CCompressionStreambuf
 
class CCompressionProcessor::CCompressionStream
 
class CCompressionProcessor::CCompressionStreambuf
 
class CCompressionProcessor::CCompressionStreamProcessor
 
class CLZOBuffer::CLZOCompressor
 
class CLZOBuffer::CLZODecompressor
 
class CTarEntryInfo::CTar
 
class CTarUserEntryInfo::CTar
 
class CTar::CTarReader
 

Detailed Description

Macro Definition Documentation

◆ COMPRESS_HANDLE_EXCEPTIONS

#define COMPRESS_HANDLE_EXCEPTIONS (   subcode,
  message 
)
Value:
catch (CException& e) { \
try { \
NCBI_REPORT_EXCEPTION_X(subcode, message, e); \
} catch (...) { \
} \
} \
catch (exception& e) { \
try { \
ERR_POST_X(subcode, Error \
<< "[" << message \
<< "] Exception: " << e.what()); \
} catch (...) { \
} \
} \
catch (...) { \
try { \
ERR_POST_X(subcode, Error \
<< "[" << message << "] Unknown exception"); \
} catch (...) { \
} \
} \
void Error(CExceptionArgs_Base &args)
Definition: ncbiexpt.hpp:1197

Macro to catch and handle exceptions (from streams in the destructor)

Definition at line 87 of file compress.hpp.

◆ ERR_COMPRESS

#define ERR_COMPRESS (   subcode,
  message 
)    ERR_POST_X(subcode, Warning << message)

Macro to report errors in compression API.

Error codes for ERR_COMPRESS and OMPRESS_HANDLE_EXCEPTIONS are really a subcodes and current maximum value is defined in 'include/util/error_codes.hpp': NCBI_DEFINE_ERRCODE_X(Util_Compress, 210, max); For new values use 'max'+1 and update it there.

Definition at line 84 of file compress.hpp.

Typedef Documentation

◆ Callback_Write

typedef size_t(* IArchive::Callback_Write) (const CArchiveEntryInfo &info, const void *buf, size_t n)

Type of user-defined callback for extraction from archive.

It can be used to extract data from a single archive entry on the fly.

Parameters
infoA current entry that is processed.
bufPointer to buffer with data.
nSize of data in the buffer.
Returns
The callback function should process all incoming data and return 'n' for success. If returning value don't equal the number of bytes in the incoming buffer, that extraction fail.

Definition at line 216 of file archive_.hpp.

◆ ELevel [1/2]

Definition at line 65 of file archive.hpp.

◆ ELevel [2/2]

Definition at line 189 of file archive_.hpp.

◆ EType

Archive entry type (the same as directory entry type).

Definition at line 115 of file archive_.hpp.

◆ TBZip2Flags

Bitwise OR of EFlags.

Definition at line 73 of file bzip2.hpp.

◆ TEntries [1/2]

Define a list of entries.

Definition at line 111 of file archive.hpp.

◆ TEntries [2/2]

Define a list of entries.

Definition at line 386 of file tar.hpp.

◆ TFile [1/2]

typedef void* CCompressionFile::TFile

Compression file handler.

Definition at line 368 of file compress.hpp.

◆ TFile [2/2]

typedef pair<string, Uint8> CTar::TFile

Define a list of files with sizes (directories and specials, such as devices, must be given with sizes of 0; symlinks – with the sizes of the names they are linking to).

Definition at line 391 of file tar.hpp.

◆ TFiles

typedef list<TFile> CTar::TFiles

Definition at line 392 of file tar.hpp.

◆ TFlags [1/3]

typedef unsigned int CArchive::TFlags

Bitwise OR of EFlags.

Definition at line 108 of file archive.hpp.

◆ TFlags [2/3]

typedef unsigned int ICompression::TFlags

Compression flags.

The flag selection depends from compression algorithm implementation. For examples see the flags defined in the derived classes: CBZip2Compression::EFlags, CLZOCompression::EFlags, CZipCompression::EFlags, etc. Bitwise OR of CXxxCompression::EFlags

Definition at line 160 of file compress.hpp.

◆ TFlags [3/3]

typedef unsigned int CTar::TFlags

Bitwise OR of EFlags.

Definition at line 357 of file tar.hpp.

◆ TLZOFlags

Bitwise OR of EFlags.

Definition at line 165 of file lzo.hpp.

◆ TOwnership

Definition at line 116 of file reader_zlib.hpp.

◆ TPosition

Type to store stream positions.

Definition at line 633 of file compress.hpp.

◆ TTarMode

typedef unsigned int TTarMode

Bitwise OR of ETarModeBits.

Definition at line 89 of file tar.hpp.

◆ TZipFlags [1/2]

Bitwise OR of EFlags.

Definition at line 127 of file zlib.hpp.

◆ TZipFlags [2/2]

Bitwise OR of EFlags.

Definition at line 121 of file zlib_cloudflare.hpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kInititialSize 

Definition at line 78 of file reader_zlib.hpp.

◆ anonymous enum

anonymous enum
Enumerator
kHeaderSize 

Definition at line 118 of file reader_zlib.hpp.

◆ EAction [1/3]

enum CArchive::EAction
protected

Action, performed on the archive.

Enumerator
eUndefined 
eCreate 
eAppend 
eList 
eUpdate 
eExtract 
eTest 

Definition at line 396 of file archive.hpp.

◆ EAction [2/3]

Action types.

Enumerator
eAction_Continue 

Continue scanning to the next data chunk, if any.

eAction_Stop 

Stop scanning.

Definition at line 636 of file compress.hpp.

◆ EAction [3/3]

enum CTar::EAction
private
Enumerator
eUndefined 
eList 
eAppend 
eUpdate 
eExtract 
eTest 
eCreate 
eInternal 

Definition at line 660 of file tar.hpp.

◆ EDecompressMode

Decompression mode (see fAllowTransparentRead flag).

Enumerator
eMode_Unknown 

Not known yet (decompress/transparent read)

eMode_Decompress 

Generic decompression.

eMode_TransparentRead 

Transparent read, the data is uncompressed.

Definition at line 331 of file compress.hpp.

◆ EDirection

Processing direction.

Enumerator
eRead 

Reading from archive.

eWrite 

Writing into archive.

Definition at line 192 of file archive_.hpp.

◆ EErrCode [1/3]

Error types that CArchive API can generate.

Enumerator
eUnsupported 
eMemory 
eUnsupportedEntryType 
eBadName 
eCreate 
eOpen 
eClose 
eList 
eExtract 
eAppend 
eWrite 
eBackup 
eRestoreAttrs 

Definition at line 64 of file archive_.hpp.

◆ EErrCode [2/3]

Enumerator
eCompression 

Compression/decompression error.

eCompressionFile 

Compression/decompression file error.

Definition at line 583 of file compress.hpp.

◆ EErrCode [3/3]

Error types that file operations can generate.

Enumerator
eUnsupportedTarFormat 
eUnsupportedEntryType 
eUnsupportedSource 
eNameTooLong 
eChecksum 
eBadName 
eCreate 
eOpen 
eRead 
eWrite 
eBackup 
eMemory 
eRestoreAttrs 

Definition at line 110 of file tar.hpp.

◆ EFlags [1/6]

General flags.

Enumerator
fOverwrite 

Allow to overwrite destinations with entries from the archive.

fUpdate 

Only update entries that are older than those already existing.

fBackup 

Backup destinations if they exist (all entries including dirs)

fEqualTypes 

If destination entry exists, it must have the same type as source.

fPreserveOwner 

Create extracted files with the original ownership.

fPreserveMode 

Create extracted files with the original permissions.

fPreserveTime 

Preserve date/times for extracted files Note, that some formats, as zip for example, store modification time only, so creation and last access time will be the same as modification time.

And even it can be a little bit off due a rounding errors.

fPreserveAll 

Preserve all file attributes.

fFollowLinks 

Follow symbolic links (instead of storing/extracting them)

fSkipUnsupported 

Skip unsupported entries rather than making files out of them when extracting (the latter is the default POSIX requirement).

On adding entry of unsupported type to the archive it will be skipping also.

fDefault 

Default flags.

Definition at line 73 of file archive.hpp.

◆ EFlags [2/6]

Compression/decompression flags.

Enumerator
fAllowTransparentRead 

Allow transparent reading data from buffer/file/stream regardless is it compressed or not.

But be aware, if data source contains broken data and API cannot detect that it is compressed data, that you can get binary instead of decompressed data. By default this flag is OFF.

fAllowEmptyData 

Allow to "compress/decompress" empty data.

The output compressed data will have header and footer only.

Definition at line 62 of file bzip2.hpp.

◆ EFlags [3/6]

Compression/decompression flags.

Enumerator
fAllowTransparentRead 

Allow transparent reading data from buffer/file/stream regardless is it compressed or not.

But be aware, if data source contains broken data and API cannot detect that it is compressed data, that you can get binary instead of decompressed data. By default this flag is OFF.

fAllowEmptyData 

Allow to "compress/decompress" empty data.

Buffer compression functions starts to return TRUE instead of FALSE for zero-length input. And, if this flag is used together with fStreamFormat than the output will have header and footer only.

fChecksum 

Add/check (accordingly to compression or decompression) the compressed data checksum.

A checksum is a form of redundancy check. We use the safe decompressor, but this can be not enough, because many data errors will not result in a compressed data violation.

fStreamFormat 

Use stream compatible format for data compression.

This flag have an effect for CompressBuffer/DecompressBuffer only. File and stream based compressors always use it by default. Use this flag with DecompressBuffer() to decompress data, compressed using streams, or compress data with CompressBuffer(), that can be decompressed using decompression stream.

Note
This flag is reguired to compress data > 4GB. LZO default single block compression cannot handle such large amount of data on some platforms.
fStoreFileInfo 

Store file information like file name and file modification date of the compressed file into the file/stream.

Works only with fStreamFormat flag.

Definition at line 131 of file lzo.hpp.

◆ EFlags [4/6]

General flags.

Enumerator
fIgnoreZeroBlocks 

Ignore blocks of zeros in archive.

fFollowLinks 

Follow symbolic links (instead of storing/extracting them)

fOverwrite 

Allow to overwrite destinations with entries from the archive.

fUpdate 

Only update entries that are older than those already existing.

fBackup 

Backup destinations if they exist (all entries including dirs)

fEqualTypes 

If destination entry exists, it must have the same type as source.

fPreserveOwner 

Create extracted files with the original ownership.

fPreserveMode 

Create extracted files with the original permissions.

fPreserveTime 

Preserve date/times for extracted files.

fPreserveAll 

Preserve all file attributes.

fKeepAbsolutePath 

Preserve absolute path instead of stripping the leadind slash('/')

fSparseUnsupported 

Do not extract PAX GNU/1.0 sparse files (treat 'em as unsupported)

fSkipUnsupported 

Skip unsupported entries rather than make files out of them when extracting (the latter is the default behavior required by POSIX)

fIgnoreUnreadable 

Ignore unreadable files/dirs (still warn them, but don't stop)

fLongNameSupplement 

Always use OldGNU headers for long names (default:only when needed)

fDumpEntryHeaders 
fSlowSkipWithRead 
fStreamPipeThrough 

Stream tar data through.

fTarfileNoTruncate 

Do not trim tar file size after append/update.

fStandardHeaderOnly 

Suppress NCBI signatures in entry headers.

fDefault 

Default flags.

Definition at line 299 of file tar.hpp.

◆ EFlags [5/6]

Compression/decompression flags.

Enumerator
fAllowTransparentRead 

Allow transparent reading data from buffer/file/stream regardless is it compressed or not.

But be aware, if data source contains broken data and API cannot detect that it is compressed data, that you can get binary instead of decompressed data. By default this flag is OFF. Note: zlib v1.1.4 and earlier have a bug in decoding. In some cases decompressor can produce output data on invalid compressed data. So, it is not recommended to use this flag with old zlib versions.

fAllowEmptyData 

Allow to "compress/decompress" empty data.

Buffer compression functions starts to return TRUE instead of FALSE for zero-length input. And, if this flag is used together with fWriteGZipFormat than the output will have gzip header and footer only.

fCheckFileHeader 

Check (and skip) gzip file header on decompression stage.

fWriteGZipFormat 

Use gzip (.gz) file format to write into compression stream (the archive also can store file name and file modification date in this format).

Note: gzip file header and footer will be omitted by default if no input data is provided, and you will have empty output, that may not be acceptable to tools like gunzip and etc – in this case use fAllowEmptyData.

fAllowConcatenatedGZip 

Allow concatenated gzip files.

Multiple compressed files can be concatenated into one file. In this case, decompressor will try to extract all members at once. But note, that better compression can be usually obtained if all members are decompressed and then recompressed in a single step.

fGZip 

Set of flags for gzip file support. See each flag description above.

fRestoreFileAttr 

This flag can be used only with DecompressFile[IntoDir]().

It allow to restore the original file name and/or time stamp stored in the file header, if present.

See also
DecompressFile, DecompressFileIntoDir

Definition at line 87 of file zlib.hpp.

◆ EFlags [6/6]

Compression/decompression flags.

Enumerator
fAllowTransparentRead 

Allow transparent reading data from buffer/file/stream regardless is it compressed or not.

But be aware, if data source contains broken data and API cannot detect that it is compressed data, that you can get binary instead of decompressed data. By default this flag is OFF. Note: zlib v1.1.4 and earlier have a bug in decoding. In some cases decompressor can produce output data on invalid compressed data. So, it is not recommended to use this flag with old zlib versions.

fAllowEmptyData 

Allow to "compress/decompress" empty data.

Buffer compression functions starts to return TRUE instead of FALSE for zero-length input. And, if this flag is used together with fWriteGZipFormat than the output will have gzip header and footer only.

fCheckFileHeader 

Check (and skip) gzip file header on decompression stage.

fWriteGZipFormat 

Use gzip (.gz) file format to write into compression stream (the archive also can store file name and file modification date in this format).

Note: gzip file header and footer will be omitted by default if no input data is provided, and you will have empty output, that may not be acceptable to tools like gunzip and etc – in this case use fAllowEmptyData.

fAllowConcatenatedGZip 

Allow concatenated gzip files.

Multiple compressed files can be concatenated into one file. In this case, decompressor will try to extract all members at once. But note, that better compression can be usually obtained if all members are decompressed and then recompressed in a single step.

fGZip 

Set of flags for gzip file support. See each flag description above.

fRestoreFileAttr 

This flag can be used only with DecompressFile[IntoDir]().

It allow to restore the original file name and/or time stamp stored in the file header, if present.

See also
DecompressFile, DecompressFileIntoDir

Definition at line 81 of file zlib_cloudflare.hpp.

◆ EFormat

Archive formats.

Enumerator
eZip 

Definition at line 68 of file archive.hpp.

◆ EHeader

Enumerator
eHeaderNone 
eHeaderAlways 
eHeaderCheck 

Definition at line 121 of file reader_zlib.hpp.

◆ ELevel

enum ICompression::ELevel ( void  )

Compression level.

It is in range [0..9]. Increase of level might mean better compression and usualy greater time of compression. Usualy 1 gives best speed, 9 gives best compression, 0 gives no compression at all (if supported). eDefault value requests a compromise between speed and compression (according to developers of the corresponding compression algorithm).

Note
Each compression library/algorithm have its own set of compression levels, than not usually fit into [0..9] range. But for convenience of use and easier switching we prowide conversion between levels, whehe "lowest" is a always a minimem allowed compression level, and "best" is a maximum. All other approximately fits in between.
Enumerator
eLevel_Default 
eLevel_NoCompression 
eLevel_Lowest 
eLevel_VeryLow 
eLevel_Low 
eLevel_MediumLow 
eLevel_Medium 
eLevel_MediumHigh 
eLevel_High 
eLevel_VeryHigh 
eLevel_Best 

Definition at line 142 of file compress.hpp.

◆ ELocation

Archive location.

Enumerator
eFile 

File-based archive.

eFileStream 

File stream based archive (FILE*)

eMemory 

Memory-based archive.

Definition at line 197 of file archive_.hpp.

◆ EMaskType [1/2]

Enumerator
eFullPathMask 
ePatternMask 

Definition at line 319 of file archive.hpp.

◆ EMaskType [2/2]

Enumerator
eExtractMask 

exact for list or extract

eExcludeMask 

pattern for all but test

Definition at line 368 of file tar.hpp.

◆ EMode

File open mode.

Enumerator
eMode_Read 

Reading from compressed file.

eMode_Write 

Writing compressed data to file.

Definition at line 371 of file compress.hpp.

◆ EOpenMode [1/2]

enum CArchive::EOpenMode
protected

Archive open mode.

Enumerator
eNone 
eRO 
eWO 
eRW 

Definition at line 388 of file archive.hpp.

◆ EOpenMode [2/2]

enum CTar::EOpenMode
private

Archive open mode and action.

Enumerator
eNone 
eWO 
eRO 
eRW 

Definition at line 654 of file tar.hpp.

◆ EOwnership

Which of the objects (passed in the constructor) should be deleted on this object's destruction.

Enumerator
fOwnNone 
fOwnReader 
fOwnAll 

Definition at line 111 of file reader_zlib.hpp.

◆ EPos

Position type.

Enumerator
ePos_Header 
ePos_Data 

Definition at line 179 of file tar.hpp.

◆ EStatus [1/2]

Type of the result of all basic functions.

Enumerator
eStatus_Success 

Everything is fine, no errors occurred.

eStatus_EndOfData 

Special case of eStatus_Success.

Logical end of (compressed) stream is detected, no errors occurred. All subsequent inquiries about data processing should be ignored.

eStatus_Error 

Error has occurred. The error code can be acquired by GetErrorCode().

eStatus_Overflow 

Output buffer overflow - not enough output space.

Buffer must be emptied and the last action repeated.

eStatus_Repeat 

Special value. Just need to repeat last action.

eStatus_Unknown 

Special value. Status is undefined.

Definition at line 467 of file compress.hpp.

◆ EStatus [2/2]

enum CTar::EStatus
private

I/O completion code.

Enumerator
eFailure 
eSuccess 
eContinue 
eZeroBlock 
eEOF 

Definition at line 671 of file tar.hpp.

◆ ESupportFeature [1/2]

Enumerator
eFeature_Type 
eFeature_AbsolutePath 
eFeature_FileStream 

Definition at line 371 of file archive.hpp.

◆ ESupportFeature [2/2]

Supported features.

Enumerator
eFeature_NoCompression 

Check if current compression method have a real support for eLevel_NoCompression, so it can store data without compression.

If this method of compression is not supported, the lowest supported level will be used instead, automatically.

See also
GetLevel, ELevel
eFeature_Dictionary 

Check if current compression have support for dictionaries.

Without support SetDictionary() always return FALSE.

See also
SetDictionary
eFeature_EstimateCompressionBufferSize 

Check if current compression have implementation for the EstimateCompressionBufferSize() method.

Without support it always return 0.

See also
EstimateCompressionBufferSize, CompressBuffer

Definition at line 191 of file compress.hpp.

◆ ETarModeBits

TTarMode –.

Permission bits as defined in tar

Enumerator
fTarSetUID 

set UID on execution

fTarSetGID 

set GID on execution

fTarSticky 

reserved (sticky bit)

fTarURead 

read by owner

fTarUWrite 

write by owner

fTarUExecute 

execute/search by owner

fTarGRead 

read by group

fTarGWrite 

write by group

fTarGExecute 

execute/search by group

fTarORead 

read by other

fTarOWrite 

write by other

fTarOExecute 

execute/search by other

Definition at line 73 of file tar.hpp.

◆ EType [1/2]

enum CNlmZipBtRdr::EType ( void  )
Enumerator
eType_unknown 
eType_plain 
eType_zlib 

Definition at line 56 of file reader_zlib.hpp.

◆ EType [2/2]

enum CTarEntryInfo::EType ( void  )

Archive entry type.

Enumerator
eFile 

Regular file.

eDir 

Directory.

eSymLink 

Symbolic link.

ePipe 

Pipe (FIFO)

eCharDev 

Character device.

eBlockDev 

Block device.

eUnknown 

Unknown type.

eHardLink 

Hard link.

eVolHeader 

Volume header.

ePAXHeader 

PAX extended header.

eSparseFile 

GNU/STAR sparse file.

eGNULongName 

GNU long name.

eGNULongLink 

GNU long link.

Definition at line 162 of file tar.hpp.

Function Documentation

◆ AddEntryFromFileSystem() [1/2]

void CArchiveZip::AddEntryFromFileSystem ( const CArchiveEntryInfo info,
const string src_path,
ELevel  level 
)
virtual

Add single entry to newly created archive from file system.

Parameters
infoEntry information to add. It should have name and type of adding entry at least. If added entry is a directory, just add an information about it to archive. CArchive process all directories recursively.
src_pathPath to file system object to add.
levelCompression level used to compress file .
See also
CreateFile, CreateMemory, AddEntryFromMemory

Implements IArchive.

Definition at line 499 of file archive_zip.cpp.

References _ASSERT, CDirEntry::eDir, CDirEntry::eFile, ICompression::eLevel_Default, info, MZ_DEFAULT_LEVEL, mz_zip_writer_add_file(), mz_zip_writer_add_mem_ex(), NULL, ZIP_HANDLE, and ZIP_THROW.

◆ AddEntryFromFileSystem() [2/2]

virtual void IArchive::AddEntryFromFileSystem ( const CArchiveEntryInfo info,
const string src_path,
ELevel  level 
)
pure virtual

Add single entry to newly created archive from file system.

Parameters
infoEntry information to add. It should have name and type of adding entry at least. If added entry is a directory, just add an information about it to archive. CArchive process all directories recursively.
src_pathPath to file system object to add.
levelCompression level used to compress file .
See also
CreateFile, CreateMemory, AddEntryFromMemory

Implemented in CArchiveZip.

◆ AddEntryFromMemory() [1/2]

void CArchiveZip::AddEntryFromMemory ( const CArchiveEntryInfo info,
void *  buf,
size_t  size,
ELevel  level 
)
virtual

Add entry to newly created archive from memory buffer.

Parameters
infoEntry information to add. It should have name and type of adding entry at least.
bufMemory buffer with data to add.
sizeSize of data in memory buffer.
levelCompression level for added data.
See also
CreateFile, CreateMemory, AddEntryFromFileSystem

Implements IArchive.

Definition at line 526 of file archive_zip.cpp.

References buf, ICompression::eLevel_Default, info, MZ_DEFAULT_LEVEL, mz_zip_writer_add_mem_ex(), ncbi::grid::netcache::search::fields::size, ZIP_HANDLE, and ZIP_THROW.

◆ AddEntryFromMemory() [2/2]

virtual void IArchive::AddEntryFromMemory ( const CArchiveEntryInfo info,
void *  buf,
size_t  size,
ELevel  level 
)
pure virtual

Add entry to newly created archive from memory buffer.

Parameters
infoEntry information to add. It should have name and type of adding entry at least.
bufMemory buffer with data to add.
sizeSize of data in memory buffer.
levelCompression level for added data.
See also
CreateFile, CreateMemory, AddEntryFromFileSystem

Implemented in CArchiveZip.

◆ Alloc()

char * CDynamicCharArray::Alloc ( size_t  size)

◆ AllowEmptyData() [1/9]

virtual bool CBZip2Compressor::AllowEmptyData ( ) const
inlinevirtual

Return TRUE if fAllowEmptyData flag is set.

Note
Used by stream buffer, that don't have access to specific compression implementation flags.

Implements CCompressionProcessor.

Definition at line 447 of file bzip2.hpp.

References CBZip2Compression::fAllowEmptyData, and CCompression::GetFlags().

◆ AllowEmptyData() [2/9]

virtual bool CBZip2Decompressor::AllowEmptyData ( ) const
inlinevirtual

Return TRUE if fAllowEmptyData flag is set.

Note
Used by stream buffer, that don't have access to specific compression implementation flags.

Implements CCompressionProcessor.

Definition at line 485 of file bzip2.hpp.

References CBZip2Compression::fAllowEmptyData, and CCompression::GetFlags().

◆ AllowEmptyData() [3/9]

virtual bool CLZOCompressor::AllowEmptyData ( ) const
inlinevirtual

Return TRUE if fAllowEmptyData flag is set.

Note
Used by stream buffer, that don't have access to specific compression implementation flags.

Implements CCompressionProcessor.

Definition at line 681 of file lzo.hpp.

References CLZOCompression::fAllowEmptyData, and CCompression::GetFlags().

◆ AllowEmptyData() [4/9]

virtual bool CLZODecompressor::AllowEmptyData ( ) const
inlinevirtual

Return TRUE if fAllowEmptyData flag is set.

Note
Used by stream buffer, that don't have access to specific compression implementation flags.

Implements CCompressionProcessor.

Definition at line 731 of file lzo.hpp.

References CLZOCompression::fAllowEmptyData, and CCompression::GetFlags().

◆ AllowEmptyData() [5/9]

virtual bool CZipCompressor::AllowEmptyData ( ) const
inlinevirtual

Return TRUE if fAllowEmptyData flag is set.

Note
Used by stream buffer, that don't have access to specific compression implementation flags.

Implements CCompressionProcessor.

Definition at line 680 of file zlib.hpp.

References CZipCompression::fAllowEmptyData, and CCompression::GetFlags().

◆ AllowEmptyData() [6/9]

virtual bool CZipDecompressor::AllowEmptyData ( ) const
inlinevirtual

Return TRUE if fAllowEmptyData flag is set.

Note
Used by stream buffer, that don't have access to specific compression implementation flags.

Implements CCompressionProcessor.

Definition at line 726 of file zlib.hpp.

References CZipCompression::fAllowEmptyData, and CCompression::GetFlags().

◆ AllowEmptyData() [7/9]

virtual bool CZipCloudflareCompressor::AllowEmptyData ( ) const
inlinevirtual

Return TRUE if fAllowEmptyData flag is set.

Note
Used by stream buffer, that don't have access to specific compression implementation flags.

Implements CCompressionProcessor.

Definition at line 674 of file zlib_cloudflare.hpp.

References CZipCloudflareCompression::fAllowEmptyData, and CCompression::GetFlags().

◆ AllowEmptyData() [8/9]

virtual bool CZipCloudflareDecompressor::AllowEmptyData ( ) const
inlinevirtual

Return TRUE if fAllowEmptyData flag is set.

Note
Used by stream buffer, that don't have access to specific compression implementation flags.

Implements CCompressionProcessor.

Definition at line 720 of file zlib_cloudflare.hpp.

References CZipCloudflareCompression::fAllowEmptyData, and CCompression::GetFlags().

◆ AllowEmptyData() [9/9]

virtual bool CCompressionProcessor::AllowEmptyData ( ) const
pure virtual

Return TRUE if fAllowEmptyData flag is set for this compression.

Note
Used by stream buffer, that don't have access to specific compression implementation flags. So this method should be implemented in each processor.

Implemented in CZipCloudflareDecompressor, CZipCloudflareCompressor, CZipDecompressor, CZipCompressor, CTransparentProcessor, CLZODecompressor, CLZOCompressor, CBZip2Decompressor, and CBZip2Compressor.

Referenced by CCompressionStreambuf::xsgetn().

◆ Append() [1/3]

unique_ptr< CTar::TEntries > CTar::Append ( const CTarUserEntryInfo entry,
CNcbiIstream is 
)
inline

Append an entry from a stream (exactly entry.GetSize() bytes).

Note
Name masks (if any set with SetMask()) are all ignored.
Returns
A list (containing this one entry) with full archive info filled in
See also
Append

Definition at line 815 of file tar.hpp.

References CTar::eAppend, CTar::x_Append(), and CTar::x_Open().

◆ Append() [2/3]

unique_ptr< CTar::TEntries > CTar::Append ( const string name)
inline

Append an entry at the end of the archive that already exists.

Appended entry can be either a file, a directory, a symbolic link, a device special file (block or character), or a FIFO special file, subject to any exclusions as set by SetMask() with eExcludeMask. The name is taken with respect to the base directory, if any set.

Adding a directory results in all its files and subdirectories (subject out what has been added.

Note that the final name of an entry may not contain embedded '..'. Leading slash in the absolute paths will be retained. The names of all appended entries will be converted to Unix format (that is, to have only forward slashes in the paths, and drive letter, if any on MS-Windows, stripped). All entries will be added at the logical end (not always EOF) of the archive, when appending to a non-empty one.

Note
Adding to a stream archive does not seek to the logical end of the archive but begins at the current position right away.
Returns
A list of entries appended.
See also
Create, Update, SetBaseDir, SetMask

Definition at line 808 of file tar.hpp.

References CTar::eAppend, CTar::x_Append(), and CTar::x_Open().

◆ Append() [3/3]

unique_ptr< CArchive::TEntries > CArchive::Append ( const string path,
ELevel  level = CCompression::eLevel_Default,
const string comment = kEmptyStr 
)
virtual

Append an entry to the archive.

Appended entry can be either a file, directory, symbolic link or etc. Each archive format have its own list of supported entry types. The name is taken with respect to the base directory, if any set. Adding a directory results in all its files and subdirectories to get added (examine the return value to find out what has been added). The names of all appended entries will be converted to Unix format (only forward slashes in the paths, and drive letter, if any on MS-Windows, stripped).

Parameters
pathPath to appended entry.
levelCompression level (if selected format support it, or default).
commentOptional comment for the appended entry (if selected format support it). For directories the comment will be added to upper directory only.
Returns
A list of entries appended.
Note
On the current moment you can use this method to add files to newly created archive only, modifying existed archive is not allowed.
See also
Create, AppendFileFromMemory, SetBaseDir, HaveSupport, Update

Definition at line 451 of file archive.cpp.

References ARCHIVE_CHECK, CArchive::eAppend, CArchive::x_Append(), and CArchive::x_Open().

◆ AppendEntry()

void CArchive::AppendEntry ( const string path,
ELevel  level 
)
protectedvirtual

Definition at line 557 of file archive.cpp.

References ARCHIVE, and CArchive::m_Current.

Referenced by CArchive::x_AppendEntry().

◆ AppendFileFromMemory()

unique_ptr< CArchive::TEntries > CArchive::AppendFileFromMemory ( const string name_in_archive,
void *  buf,
size_t  buf_size,
ELevel  level = CCompression::eLevel_Default,
const string comment = kEmptyStr 
)
virtual

Append a single file entry to the created archive using data from memory buffer.

These function assign the current local time to added entry.

Parameters
name_in_archiveName of the file entry in the archive. You can use any symbols, that allowed for file names. Also, you can use relative path here, if you want to create some structure in the archive and put the data to a file in the subdirectory.
bufBuffer with data to add.
buf_sizeSize of data in the buffer.
levelCompression level (if selected format support it, or default).
commentOptional comment for the appended entry (if selected format support it).
Returns
An information about added entry.
Note
On the current moment you can use this method to add files to newly created archive only, modification existing archive is not allowed.
See also
Create, Append

Definition at line 461 of file archive.cpp.

References ARCHIVE, ARCHIVE_CHECK, ARCHIVE_THROW, buf, CArchive::eAppend, CArchive::eFeature_AbsolutePath, CDirEntry::eFile, entries, CArchive::eZip, CArchive::HaveSupport(), kEmptyStr, CArchiveEntryInfo::m_Comment, CArchive::m_Current, CArchive::m_Format, CArchiveEntryInfo::m_Name, CArchiveEntryInfo::m_Type, NCBI_THROW, s_ToArchiveName(), and CArchive::x_Open().

◆ At()

char* CDynamicCharArray::At ( size_t  pos) const
inline

◆ CArchive() [1/2]

CArchive::CArchive ( const CArchive )
protected

◆ CArchive() [2/2]

CArchive::CArchive ( EFormat  format)
protected

Construct an archive object of specified format.

Declared as protected to avoid direct usage. Use derived classes CArchiveFile or CArchiveMemory instead.

Parameters
formatArchive format
See also
CArchiveFile, CArchiveMemory

Definition at line 211 of file archive.cpp.

References ARCHIVE, ARCHIVE_THROW, CArchive::eZip, format, NStr::IntToString(), and CArchive::m_Archive.

◆ CArchiveCompressionFileStream() [1/3]

CArchiveCompressionFileStream::CArchiveCompressionFileStream ( const CArchiveCompressionFileStream )
private

◆ CArchiveCompressionFileStream() [2/3]

CArchiveCompressionFileStream::CArchiveCompressionFileStream ( EFormat  format,
FILE *  filestream 
)

Create new archive on a base of already opened FILE* stream, beginning at the current FILE* position.

Parameters
formatArchive format.
filestreamFile stream that can be used for archive operations. It should be opened for writing binary data.
See also
Append, AppendFileFromMemory, Close

Definition at line 1273 of file archive.cpp.

References CArchiveCompressionFileStream::Create(), IArchive::eFileStream, CArchiveCompressionFileStream::m_fd, CArchiveCompressionFileStream::m_FileStream, and CArchive::m_Location.

◆ CArchiveCompressionFileStream() [3/3]

CArchiveCompressionFileStream::CArchiveCompressionFileStream ( EFormat  format,
int  fd 
)

Constructor for stream-based archive.

Parameters
formatArchive format.
fdFile/socket descriptor to write archive to. Socket descriptor should be already connected and file descriptor should be opened for writing before creating an archive.
See also
Append, AppendFileFromMemory, Close

Definition at line 1261 of file archive.cpp.

References _T_XCSTRING, ARCHIVE_THROW, CArchiveCompressionFileStream::Create(), IArchive::eFileStream, CArchiveCompressionFileStream::m_fd, CArchiveCompressionFileStream::m_FileStream, CArchive::m_Location, NcbiSys_dup, and NcbiSys_fdopen.

◆ CArchiveEntryInfo()

CArchiveEntryInfo::CArchiveEntryInfo ( )
inline

Definition at line 118 of file archive_.hpp.

References CArchiveEntryInfo::Reset().

◆ CArchiveFile() [1/2]

CArchiveFile::CArchiveFile ( const CArchiveFile )
private

◆ CArchiveFile() [2/2]

CArchiveFile::CArchiveFile ( EFormat  format,
const string filename 
)

Constructor for file-based archive.

Parameters
formatArchive format.
filenamePath to archive file name. Note, that directory in that archive file will be create should exists.
See also
Create, Extract, List, Test, Append

Definition at line 1119 of file archive.cpp.

References IArchive::eFile, CArchive::fDefault, CArchiveFile::m_FileName, CArchive::m_Flags, and CArchive::m_Location.

◆ CArchiveMemory() [1/2]

CArchiveMemory::CArchiveMemory ( const CArchiveMemory )
private

◆ CArchiveMemory() [2/2]

CArchiveMemory::CArchiveMemory ( EFormat  format,
const void *  buf = NULL,
size_t  buf_size = 0 
)

Constructor for memory-based archive.

Parameters
formatArchive format.
bufPointer to an archive located in memory. Used only to open already existed archive for reading. Never used if you would like to create new archive, see Create().
buf_sizeSize of the archive.
See also
Create, Extract, List, Test, Append

Definition at line 1150 of file archive.cpp.

References IArchive::eMemory, CArchive::fDefault, CArchiveMemory::m_Buf, CArchiveMemory::m_BufSize, CArchive::m_Flags, CArchiveMemory::m_InitialAllocationSize, CArchive::m_Location, and ncbi::grid::netcache::search::fields::size.

◆ CArchiveZip()

CArchiveZip::CArchiveZip ( void  )
inline

Constructor.

Definition at line 70 of file archive_zip.hpp.

◆ CBZip2Compression() [1/2]

CBZip2Compression::CBZip2Compression ( const CBZip2Compression )
private

Private copy constructor to prohibit copy.

◆ CBZip2Compression() [2/2]

CBZip2Compression::CBZip2Compression ( ELevel  level = eLevel_Default)

Constructor.

◆ CBZip2CompressionFile() [1/3]

CBZip2CompressionFile::CBZip2CompressionFile ( const CBZip2CompressionFile )
private

Private copy constructor to prohibit copy.

◆ CBZip2CompressionFile() [2/3]

CBZip2CompressionFile::CBZip2CompressionFile ( const string file_name,
EMode  mode,
ELevel  level = eLevel_Default 
)

Constructor.

Automatically calls Open() with given file name, mode and compression level.

Note
This constructor don't allow to use any advanced compression parameters or a dictionary. If you need to set any of them, please use simplified conventional constructor, set advanced parameters and use Open().

◆ CBZip2CompressionFile() [3/3]

CBZip2CompressionFile::CBZip2CompressionFile ( ELevel  level = eLevel_Default)

Conventional constructor.

◆ CBZip2Compressor()

CBZip2Compressor::CBZip2Compressor ( ELevel  level = eLevel_Default,
TBZip2Flags  flags = 0 
)

Constructor.

◆ CBZip2Decompressor()

CBZip2Decompressor::CBZip2Decompressor ( TBZip2Flags  flags = 0)

Constructor.

◆ CBZip2StreamCompressor() [1/3]

CBZip2StreamCompressor::CBZip2StreamCompressor ( CBZip2Compression::ELevel  level,
CBZip2Compression::TBZip2Flags  flags = 0 
)
inline

Conventional constructor.

Definition at line 526 of file bzip2.hpp.

◆ CBZip2StreamCompressor() [2/3]

CBZip2StreamCompressor::CBZip2StreamCompressor ( CBZip2Compression::ELevel  level,
streamsize  in_bufsize,
streamsize  out_bufsize,
CBZip2Compression::TBZip2Flags  flags = 0 
)
inline

Full constructor.

Definition at line 515 of file bzip2.hpp.

◆ CBZip2StreamCompressor() [3/3]

CBZip2StreamCompressor::CBZip2StreamCompressor ( CBZip2Compression::TBZip2Flags  flags = 0)
inline

Conventional constructor.

Definition at line 536 of file bzip2.hpp.

◆ CBZip2StreamDecompressor() [1/2]

CBZip2StreamDecompressor::CBZip2StreamDecompressor ( CBZip2Compression::TBZip2Flags  flags = 0)
inline

Conventional constructor.

Definition at line 572 of file bzip2.hpp.

◆ CBZip2StreamDecompressor() [2/2]

CBZip2StreamDecompressor::CBZip2StreamDecompressor ( streamsize  in_bufsize,
streamsize  out_bufsize,
CBZip2Compression::TBZip2Flags  flags = 0 
)
inline

Full constructor.

Definition at line 562 of file bzip2.hpp.

◆ CCompression()

CCompression::CCompression ( ELevel  level = eLevel_Default)

Definition at line 46 of file compress.cpp.

◆ CCompressionDictionary() [1/3]

CCompressionDictionary::CCompressionDictionary ( const string filename)

◆ CCompressionDictionary() [2/3]

CCompressionDictionary::CCompressionDictionary ( const void *  buf,
size_t  size,
ENcbiOwnership  own = eNoOwnership 
)

Use dictionary data from a memory buffer.

CCompressionDictionary can take an ownership of allocated memory, so it can be automatically deallocated when not needed anymore.

Definition at line 282 of file compress.cpp.

◆ CCompressionDictionary() [3/3]

CCompressionDictionary::CCompressionDictionary ( istream &  is,
size_t  size 
)

Load a dictionary up to 'size' bytes from a stream 'is'.

Ideally, 'size' should be a real dictionary data size. You can use bigger sizes, but it will be less memory efficient.

Definition at line 324 of file compress.cpp.

References CCompressionDictionary::LoadFromStream(), CCompressionDictionary::m_Size, NCBI_THROW, and ncbi::grid::netcache::search::fields::size.

◆ CCompressionFile() [1/2]

CCompressionFile::CCompressionFile ( const string path,
EMode  mode,
size_t  compression_in_bufsize = 0,
size_t  compression_out_bufsize = 0 
)

◆ CCompressionFile() [2/2]

CCompressionFile::CCompressionFile ( void  )

Definition at line 203 of file compress.cpp.

◆ CCompressionProcessor()

CCompressionProcessor::CCompressionProcessor ( void  )

Definition at line 185 of file compress.cpp.

References CCompressionProcessor::Reset().

◆ CDynamicCharArray() [1/3]

CDynamicCharArray::CDynamicCharArray ( const CDynamicCharArray )
private

◆ CDynamicCharArray() [2/3]

CDynamicCharArray::CDynamicCharArray ( size_t  size)

Definition at line 46 of file reader_zlib.cpp.

◆ CDynamicCharArray() [3/3]

CDynamicCharArray::CDynamicCharArray ( void  )
inline

Definition at line 82 of file reader_zlib.hpp.

◆ Checkpoint() [1/2]

virtual bool CArchive::Checkpoint ( const CArchiveEntryInfo ,
EAction   
)
inlineprotectedvirtual

Return false to skip the current entry when processing.

Note that the callback can encounter multiple entries of the same file in case the archive has been updated (so only the last occurrence is the actual copy of the file when extracted).

Definition at line 426 of file archive.hpp.

Referenced by CArchive::x_AppendEntry(), and CArchive::x_ReadAndProcess().

◆ Checkpoint() [2/2]

virtual bool CTar::Checkpoint ( const CTarEntryInfo ,
bool   
)
inlineprotectedvirtual

Return false to skip the current entry when reading; the return code gets ignored when writing.

Note that the callback can encounter multiple entries of the same file in case the archive has been updated (so only the last occurrence is the actual copy of the file when extracted).

Reimplemented in CTarCheckpointed.

Definition at line 648 of file tar.hpp.

Referenced by CTar::x_ReadAndProcess(), and CTar::x_WriteEntryInfo().

◆ Close() [1/10]

void CArchive::Close ( void  )
virtual

Close the archive making sure all pending output is flushed.

See also
~CArchive

Reimplemented in CArchiveCompressionFileStream.

Definition at line 246 of file archive.cpp.

References ARCHIVE, ARCHIVE_CHECK, CArchive::eNone, CArchive::m_Modified, and CArchive::m_OpenMode.

Referenced by CArchiveCompressionFileStream::Close(), CArchiveMemory::Load(), CArchive::x_Open(), and CArchive::~CArchive().

◆ Close() [2/10]

void CArchiveCompressionFileStream::Close ( void  )
virtual

Close archive.

Writes all remaining data into the file descriptor/stream. CArchiveCompressionFileStream object cannot be used for any archive operation after this call. The file stream/descriptor will not be closed.

Reimplemented from CArchive.

Definition at line 1311 of file archive.cpp.

References CArchive::Close().

Referenced by CArchiveCompressionFileStream::Create().

◆ Close() [3/10]

virtual bool CBZip2CompressionFile::Close ( void  )
virtual

Close compressed file.

Flushes all pending output if necessary, closes the compressed file.

Returns
TRUE on success, FALSE on error.
See also
Open, Read, Write

Implements CCompressionFile.

◆ Close() [4/10]

bool CLZOCompressionFile::Close ( void  )
virtual

◆ Close() [5/10]

void CTar::Close ( void  )
inline

Close the archive making sure all pending output is flushed.

Normally, direct call of this method need _not_ intersperse successive archive manipulations by other methods, as they open and close the archive automagically as needed. Rather, this call is to make sure the archive is complete earlier than it otherwise usually be done automatically in the destructor of the CTar object.

See also
~CTar

Definition at line 802 of file tar.hpp.

References CTar::x_Close(), and CTar::x_Flush().

Referenced by CDownloadJob::x_DownloadAndExtract().

◆ Close() [6/10]

virtual bool CZipCompressionFile::Close ( void  )
virtual

Close compressed file.

Flushes all pending output if necessary, closes the compressed file.

Returns
TRUE on success, FALSE on error.
See also
Open, Read, Write

Implements CCompressionFile.

◆ Close() [7/10]

virtual bool CZipCloudflareCompressionFile::Close ( void  )
virtual

Close compressed file.

Flushes all pending output if necessary, closes the compressed file.

Returns
TRUE on success, FALSE on error.
See also
Open, Read, Write

Implements CCompressionFile.

◆ Close() [8/10]

void CArchiveZip::Close ( void  )
virtual

Close the archive.

For file-based archives it flushes all pending output. All added entries will appears in the archive only after this call. This method will be automatically called from destructor if you forgot to call it directly. But note, that if the archive is created in memory, it will be lost. You should call FinalizeMemory() to get data before closing archive.

See also
FinalizeMemory, OpenFile, OpenMemory

Implements IArchive.

Definition at line 238 of file archive_zip.cpp.

References _ASSERT, IArchive::eFile, IArchive::eFileStream, IArchive::eRead, IArchive::eWrite, IArchive::m_Location, IArchive::m_Mode, mz_zip_reader_end(), mz_zip_writer_end(), mz_zip_writer_finalize_archive(), ZIP_CHECK, ZIP_DELETE, ZIP_HANDLE, and ZIP_THROW.

Referenced by CArchiveZip::~CArchiveZip().

◆ Close() [9/10]

virtual void IArchive::Close ( void  )
pure virtual

Close the archive.

For file-based archives it flushes all pending output. All added entries will appears in the archive only after this call. This method will be automatically called from destructor if you forgot to call it directly. But note, that if the archive is created in memory, it will be lost. You should call FinalizeMemory() to get it.

See also
FinalizeMemory, OpenFile, OpenMemory

Implemented in CArchiveZip.

◆ Close() [10/10]

virtual bool CCompressionFile::Close ( void  )
pure virtual

Flushes all pending output if necessary, closes the compressed file.

Return TRUE on success, FALSE on error.

Implemented in CZipCloudflareCompressionFile, CZipCompressionFile, CLZOCompressionFile, and CBZip2CompressionFile.

◆ CLZOBuffer() [1/2]

CLZOBuffer::CLZOBuffer ( const CLZOBuffer )
private

Private copy constructor to prohibit copy.

◆ CLZOBuffer() [2/2]

CLZOBuffer::CLZOBuffer ( void  )

Constructor.

Definition at line 1073 of file lzo.cpp.

References CLZOBuffer::m_InSize, and CLZOBuffer::m_OutSize.

◆ CLZOCompression() [1/2]

CLZOCompression::CLZOCompression ( const CLZOCompression )
private

Private copy constructor to prohibit copy.

◆ CLZOCompression() [2/2]

CLZOCompression::CLZOCompression ( ELevel  level = eLevel_Default)

◆ CLZOCompressionFile() [1/3]

CLZOCompressionFile::CLZOCompressionFile ( const CLZOCompressionFile )
private

Private copy constructor to prohibit copy.

◆ CLZOCompressionFile() [2/3]

CLZOCompressionFile::CLZOCompressionFile ( const string file_name,
EMode  mode,
ELevel  level = eLevel_Default 
)

Constructor.

Automatically calls Open() with given file name, mode and compression level.

Note
This constructor don't allow to use any advanced compression parameters or a dictionary. If you need to set any of them, please use simplified conventional constructor, set advanced parameters and use Open().

Definition at line 868 of file lzo.cpp.

References CCompressionFile::eMode_Read, file_name, NCBI_THROW, and CLZOCompressionFile::Open().

◆ CLZOCompressionFile() [3/3]

CLZOCompressionFile::CLZOCompressionFile ( ELevel  level = eLevel_Default)

Conventional constructor.

Definition at line 882 of file lzo.cpp.

◆ CLZOCompressor()

CLZOCompressor::CLZOCompressor ( ELevel  level = eLevel_Default,
TLZOFlags  flags = 0 
)

Constructor.

Definition at line 1107 of file lzo.cpp.

References flags, CLZOCompression::fStreamFormat, and CCompression::SetFlags().

◆ CLZODecompressor()

CLZODecompressor::CLZODecompressor ( TLZOFlags  flags)

Constructor.

Definition at line 1338 of file lzo.cpp.

References flags, CLZOCompression::fStreamFormat, and CCompression::SetFlags().

◆ CLZOStreamCompressor() [1/3]

CLZOStreamCompressor::CLZOStreamCompressor ( CLZOCompression::ELevel  level,
CLZOCompression::TLZOFlags  flags = 0 
)
inline

Conventional constructor.

Definition at line 788 of file lzo.hpp.

◆ CLZOStreamCompressor() [2/3]

CLZOStreamCompressor::CLZOStreamCompressor ( CLZOCompression::ELevel  level,
streamsize  in_bufsize,
streamsize  out_bufsize,
CLZOCompression::TLZOFlags  flags = 0 
)
inline

Full constructor.

Definition at line 777 of file lzo.hpp.

◆ CLZOStreamCompressor() [3/3]

CLZOStreamCompressor::CLZOStreamCompressor ( CLZOCompression::TLZOFlags  flags = 0)
inline

Conventional constructor.

Definition at line 798 of file lzo.hpp.

◆ CLZOStreamDecompressor() [1/2]

CLZOStreamDecompressor::CLZOStreamDecompressor ( CLZOCompression::TLZOFlags  flags = 0)
inline

Conventional constructor.

Definition at line 837 of file lzo.hpp.

◆ CLZOStreamDecompressor() [2/2]

CLZOStreamDecompressor::CLZOStreamDecompressor ( streamsize  in_bufsize,
streamsize  out_bufsize,
CLZOCompression::TLZOFlags  flags = 0 
)
inline

Full constructor.

Definition at line 827 of file lzo.hpp.

◆ CNlmZipBtRdr() [1/2]

CNlmZipBtRdr::CNlmZipBtRdr ( CByteSourceReader src)

Definition at line 201 of file reader_zlib.cpp.

◆ CNlmZipBtRdr() [2/2]

CNlmZipBtRdr::CNlmZipBtRdr ( const CNlmZipBtRdr )
private

◆ CNlmZipReader() [1/2]

CNlmZipReader::CNlmZipReader ( const CNlmZipReader )
private

◆ CNlmZipReader() [2/2]

CNlmZipReader::CNlmZipReader ( IReader reader,
TOwnership  own = fOwnNone,
EHeader  header = eHeaderCheck 
)

◆ CompressBlock()

int CLZOCompression::CompressBlock ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t *  dst_len 
)
protected

◆ CompressBlockStream()

int CLZOCompression::CompressBlockStream ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t *  dst_len 
)
protected

Compress block of data for stream format (fStreamFormat flag).

Returns
Return compressor error code.

Definition at line 387 of file lzo.cpp.

References _ASSERT, CLZOCompression::CompressBlock(), kMax_UInt, offset, CCompression::SetError(), and CCompressionUtil::StoreUI4().

Referenced by CLZOCompression::CompressBuffer(), and CLZOCompressor::CompressCache().

◆ CompressBuffer() [1/5]

virtual bool CBZip2Compression::CompressBuffer ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t  dst_size,
size_t *  dst_len 
)
virtual

Compress data in the buffer.

Altogether, the total size of the destination buffer must be little more then size of the source buffer.

Parameters
src_buf[in] Source buffer.
src_len[in] Size of data in source buffer.
dst_buf[in] Destination buffer.
dst_size[in] Size of destination buffer.
dst_len[out] Size of compressed data in destination buffer.
Returns
Return TRUE if operation was succesfully or FALSE otherwise. On success, 'dst_buf' contains compressed data of dst_len size.
See also
DecompressBuffer

Implements ICompression.

Referenced by CT_CompressBuffer().

◆ CompressBuffer() [2/5]

bool CLZOCompression::CompressBuffer ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t  dst_size,
size_t *  dst_len 
)
virtual

Compress data in the buffer.

Parameters
src_buf[in] Source buffer.
src_len[in] Size of data in source buffer.
dst_buf[in] Destination buffer.
dst_size[in] Size of destination buffer. The size of the destination buffer must be a little more then size of the source buffer.
dst_len[out] Size of compressed data in destination buffer.
Returns
Return TRUE if operation was successfully or FALSE otherwise. On success, 'dst_buf' contains compressed data of dst_len size.
Note
Use fStreamFormat flag to compress data > 4GB. LZO default single block compression cannot handle such large amount of data on some platforms.
See also
EstimateCompressionBufferSize, DecompressBuffer

Implements ICompression.

Definition at line 490 of file lzo.cpp.

References _VERIFY, CLZOCompression::CompressBlock(), CLZOCompression::CompressBlockStream(), ERR_COMPRESS, CLZOCompression::EstimateCompressionBufferSize(), F_ISSET, CLZOCompression::fAllowEmptyData, CLZOCompression::FormatErrorMessage(), CLZOCompression::fStreamFormat, CCompression::GetErrorCode(), CCompression::GetFlags(), CLZOCompression::GetLevel(), CLZOCompression::GetLZOErrorDescription(), CLZOCompression::InitCompression(), kMax_UInt, CLZOCompression::m_BlockSize, min(), n, NULL, s_WriteLZOHeader(), CCompression::SetError(), and CCompressionUtil::StoreUI4().

Referenced by CChangePhyloTreeCommand::CChangePhyloTreeCommand(), and CT_CompressBuffer().

◆ CompressBuffer() [3/5]

virtual bool CZipCompression::CompressBuffer ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t  dst_size,
size_t *  dst_len 
)
virtual

Compress data in the buffer.

Parameters
src_bufSource buffer.
src_lenSize of data in source buffer.
dst_bufDestination buffer.
dst_sizeSize of destination buffer. In some cases, small source data or bad compressed data for example, it should be a little more then size of the source buffer.
dst_lenSize of compressed data in destination buffer.
Returns
Return TRUE if operation was successfully or FALSE otherwise. On success, 'dst_buf' contains compressed data of 'dst_len' size.
See also
EstimateCompressionBufferSize, DecompressBuffer

Implements ICompression.

Referenced by CId2Compressor::CompressChunk(), CT_CompressBuffer(), and CPdfObject::x_PrintTo().

◆ CompressBuffer() [4/5]

virtual bool CZipCloudflareCompression::CompressBuffer ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t  dst_size,
size_t *  dst_len 
)
virtual

Compress data in the buffer.

Parameters
src_bufSource buffer.
src_lenSize of data in source buffer.
dst_bufDestination buffer.
dst_sizeSize of destination buffer. In some cases, small source data or bad compressed data for example, it should be a little more then size of the source buffer.
dst_lenSize of compressed data in destination buffer.
Returns
Return TRUE if operation was successfully or FALSE otherwise. On success, 'dst_buf' contains compressed data of 'dst_len' size.
See also
EstimateCompressionBufferSize, DecompressBuffer

Implements ICompression.

◆ CompressBuffer() [5/5]

virtual bool ICompression::CompressBuffer ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t  dst_size,
size_t *  dst_len 
)
pure virtual

(De)compress the source buffer into the destination buffer.

Return TRUE on success, FALSE on error. The compressor error code can be acquired via GetErrorCode() call. Notice that altogether the total size of the destination buffer must be little more then size of the source buffer.

Implemented in CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.

Referenced by CBDB_RawFile::x_DB_CPut(), and CBDB_RawFile::x_DB_Put().

◆ CompressCache()

bool CLZOCompressor::CompressCache ( void  )
protected

◆ CompressFile() [1/5]

virtual bool CBZip2Compression::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 
)
virtual

Compress file.

Parameters
src_fileFile name of source file.
dst_fileFile name of result file.
file_io_bufsizeSize of the buffer used to read from a source file. Writing happens immediately on receiving some data from a compressor.
compression_in_bufsizeSize of the internal buffer holding input data to be compressed. It can be different from 'file_io_bufsize' depending on a using compression method, OS and file system.
compression_out_bufsizeSize of the internal buffer to receive data from a compressor.
Returns
Return TRUE on success, FALSE on error.
Note
This method don't store any file meta information like name, date/time, owner or attributes.
See also
DecompressFile, GetRecommendedBufferSizes, CBZip2CompressionFile

Implements ICompression.

◆ CompressFile() [2/5]

bool CLZOCompression::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 
)
virtual

Compress file.

Parameters
src_fileFile name of source file.
dst_fileFile name of result file.
file_io_bufsizeSize of the buffer used to read from a source file. Writing happens immediately on receiving some data from a compressor.
compression_in_bufsizeSize of the internal buffer holding input data to be compressed. It can be different from 'file_io_bufsize' depending on a using compression method, OS and file system.
compression_out_bufsizeSize of the internal buffer to receive data from a compressor.
Returns
Return TRUE on success, FALSE on error.
Note
This method don't store any file meta information like name, date/time, owner or attributes.
See also
DecompressFile, GetRecommendedBufferSizes, CLZOCompressionFile

Implements ICompression.

Definition at line 730 of file lzo.cpp.

References CLZOCompressionFile::Close(), CCompressionFile::eMode_Write, CLZOCompression::GetBlockSize(), CCompression::GetErrorCode(), CCompression::GetErrorDescription(), CCompression::GetFlags(), CLZOCompression::GetLevel(), CLZOCompressionFile::Open(), CLZOCompression::SetBlockSize(), CCompression::SetError(), CCompression::SetFlags(), and CCompression::x_CompressFile().

◆ CompressFile() [3/5]

virtual bool CZipCompression::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 
)
virtual

Compress file.

Parameters
src_fileFile name of source file.
dst_fileFile name of result file.
file_io_bufsizeSize of the buffer used to read from a source file. Writing happens immediately on receiving some data from a compressor.
compression_in_bufsizeSize of the internal buffer holding input data to be compressed. It can be different from 'file_io_bufsize' depending on a using compression method, OS and file system.
compression_out_bufsizeSize of the internal buffer to receive data from a compressor.
Returns
Return TRUE on success, FALSE on error.
Note
This method, as well as some gzip utilities, always keeps the original file name and timestamp in the compressed file. On this moment DecompressFile() method do not use original file name at all, but be aware... If you assign different base name to destination compressed file, that behavior of decompression utilities on different platforms may differ. For example, WinZip on MS Windows always restore original file name and timestamp stored in the file. UNIX gunzip have -N option for this, but by default do not use it, and just creates a decompressed file with the name of the compressed file without .gz extension.
See also
DecompressFile, DecompressFileIntoDir, GetRecommendedBufferSizes, CZipCompressionFile

Implements ICompression.

◆ CompressFile() [4/5]

virtual bool CZipCloudflareCompression::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 
)
virtual

Compress file.

Parameters
src_fileFile name of source file.
dst_fileFile name of result file.
file_io_bufsizeSize of the buffer used to read from a source file. Writing happens immediately on receiving some data from a compressor.
compression_in_bufsizeSize of the internal buffer holding input data to be compressed. It can be different from 'file_io_bufsize' depending on a using compression method, OS and file system.
compression_out_bufsizeSize of the internal buffer to receive data from a compressor.
Returns
Return TRUE on success, FALSE on error.
Note
This method, as well as some gzip utilities, always keeps the original file name and timestamp in the compressed file. On this moment DecompressFile() method do not use original file name at all, but be aware... If you assign different base name to destination compressed file, that behavior of decompression utilities on different platforms may differ. For example, WinZip on MS Windows always restore original file name and timestamp stored in the file. UNIX gunzip have -N option for this, but by default do not use it, and just creates a decompressed file with the name of the compressed file without .gz extension.
See also
DecompressFile, DecompressFileIntoDir, GetRecommendedBufferSizes, CZipCloudflareCompressionFile

Implements ICompression.

◆ CompressFile() [5/5]

virtual bool ICompression::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 
)
pure virtual

(De)compress file "src_file" and put result to file "dst_file".

Return TRUE on success, FALSE on error.

Implemented in CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.

◆ Create() [1/5]

void CArchiveMemory::Create ( size_t  initial_allocation_size)
virtual

Create a new empty archive in memory.

Parameters
initial_allocation_sizeEstimated size of the archive, if known. Bigger size allow to avoid extra memory reallocations.
See also
Append, Finalize

Definition at line 1170 of file archive.cpp.

References ARCHIVE_CHECK, CArchive::eCreate, CArchiveMemory::m_Buf, CArchiveMemory::m_InitialAllocationSize, CArchiveMemory::m_OwnBuf, NULL, AutoArray< X, Del >::reset(), and CArchive::x_Open().

◆ Create() [2/5]

void CArchive::Create ( void  )
virtual

Create a new empty archive.

See also
Append

Reimplemented in CArchiveCompressionFileStream, and CArchiveMemory.

Definition at line 319 of file archive.cpp.

References ARCHIVE_CHECK, CArchive::eCreate, and CArchive::x_Open().

◆ Create() [3/5]

void CArchiveMemory::Create ( void  )
virtual

Create a new empty archive.

See also
Append

Reimplemented from CArchive.

Definition at line 1164 of file archive.cpp.

◆ Create() [4/5]

void CArchiveCompressionFileStream::Create ( void  )
virtual

Create a new empty archive.

Calling this method is optional, new archive is created by default in the constructor. But if you want to add another archive using current CArchiveCompressionFileStream object, you can use Create() after Close().

See also
Append, Close

Reimplemented from CArchive.

Definition at line 1290 of file archive.cpp.

References CArchiveCompressionFileStream::Close(), CArchive::eCreate, CArchive::eNone, CArchive::m_OpenMode, and CArchiveCompressionFileStream::Open().

Referenced by CArchiveCompressionFileStream::CArchiveCompressionFileStream().

◆ Create() [5/5]

void CTar::Create ( void  )
inline

Create a new empty archive.

If a file with such a name already exists it will be overwritten.

See also
Append

Definition at line 796 of file tar.hpp.

References CTar::eCreate, and CTar::x_Open().

◆ CreateFile() [1/2]

void CArchiveZip::CreateFile ( const string filename)
virtual

Create new archive file.

Parameters
filenameFile name of the archive to create.
Note
File can be overwritten if exists.
See also
CreateMemory, AddEntryFromFile, AddEntryFromMemory

Implements IArchive.

Definition at line 130 of file archive_zip.cpp.

References IArchive::eFile, IArchive::eWrite, IArchive::m_Location, IArchive::m_Mode, mz_zip_writer_init_file(), ZIP_DELETE, ZIP_HANDLE, ZIP_NEW, and ZIP_THROW.

◆ CreateFile() [2/2]

virtual void IArchive::CreateFile ( const string filename)
pure virtual

Create new archive file.

Parameters
filenameFile name of the archive to create.
Note
File can be overwritten if exists.
See also
CreateFileStream, CreateMemory, AddEntryFromFile, AddEntryFromMemory

Implemented in CArchiveZip.

◆ CreateFileStream() [1/2]

void CArchiveZip::CreateFileStream ( FILE *  filestream)
virtual

Create new archive file on top of a FILE stream.

Parameters
filestreamFile stream that can be used for archive operations.
Note
File stream should be opened with necessary flags to allow read/write, depending on performing archive operations.
The file stream will not be closed after closing archive with Close() .
See also
CreateFile, CreateMemory, AddEntryFromFile, AddEntryFromMemory

Implements IArchive.

Definition at line 144 of file archive_zip.cpp.

References IArchive::eFileStream, IArchive::eWrite, IArchive::m_Location, IArchive::m_Mode, mz_zip_writer_init_cfile(), ZIP_DELETE, ZIP_HANDLE, ZIP_NEW, and ZIP_THROW.

◆ CreateFileStream() [2/2]

virtual void IArchive::CreateFileStream ( FILE *  filestream)
pure virtual

Create new archive file on top of a FILE stream.

Parameters
filestreamFile stream that can be used for archive operations.
Note
File stream should be opened with necessary flags to allow read/write, depending on performing archive operations.
The file stream will not be closed after closing archive with Close() .
See also
CreateFile, CreateMemory, AddEntryFromFile, AddEntryFromMemory

Implemented in CArchiveZip.

◆ CreateMemory() [1/2]

void CArchiveZip::CreateMemory ( size_t  initial_allocation_size = 0)
virtual

Create new archive located in memory.

Parameters
initial_allocation_sizeEstimated size of the archive, if known. Bigger size allow to avoid extra memory reallocations.
See also
FinalizeMemory, AddEntryFromFile, AddEntryFromMemory

Implements IArchive.

Definition at line 158 of file archive_zip.cpp.

References IArchive::eMemory, IArchive::eWrite, IArchive::m_Location, IArchive::m_Mode, mz_zip_writer_init_heap(), ZIP_DELETE, ZIP_HANDLE, ZIP_NEW, and ZIP_THROW.

◆ CreateMemory() [2/2]

virtual void IArchive::CreateMemory ( size_t  initial_allocation_size = 0)
pure virtual

Create new archive located in memory.

Parameters
initial_allocation_sizeEstimated size of the archive, if known. Bigger size allow to avoid extra memory reallocations.
See also
FinalizeMemory, AddEntryFromFile, AddEntryFromMemory

Implemented in CArchiveZip.

◆ CTar() [1/3]

CTar::CTar ( CNcbiIos stream,
size_t  blocking_factor = 20 
)

Stream version does not at all use stream positioning and so is safe on non-positionable streams, like pipes/sockets (or magnetic tapes :-I).

Definition at line 1326 of file tar.cpp.

References CTar::x_Init().

◆ CTar() [2/3]

CTar::CTar ( const CTar )
private

◆ CTar() [3/3]

CTar::CTar ( const string filename,
size_t  blocking_factor = 20 
)

Constructors.

Definition at line 1307 of file tar.cpp.

References CTar::x_Init().

Referenced by CTar::Extract().

◆ CTarEntryInfo()

CTarEntryInfo::CTarEntryInfo ( Uint8  pos = 0)
inlineprotected

Definition at line 240 of file tar.hpp.

References CTarEntryInfo::m_Stat.

◆ CTarUserEntryInfo()

CTarUserEntryInfo::CTarUserEntryInfo ( const string name,
Uint8  size 
)
inline

◆ CZipCloudflareCompression() [1/2]

CZipCloudflareCompression::CZipCloudflareCompression ( const CZipCloudflareCompression )
private

Private copy constructor to prohibit copy.

◆ CZipCloudflareCompression() [2/2]

CZipCloudflareCompression::CZipCloudflareCompression ( ELevel  level = eLevel_Default)

Constructor.

Note
For setting up advanced compression parameters see Set*() methods.

◆ CZipCloudflareCompressionFile() [1/3]

CZipCloudflareCompressionFile::CZipCloudflareCompressionFile ( const CZipCloudflareCompressionFile )
private

Private copy constructor to prohibit copy.

◆ CZipCloudflareCompressionFile() [2/3]

CZipCloudflareCompressionFile::CZipCloudflareCompressionFile ( const string file_name,
EMode  mode,
ELevel  level = eLevel_Default 
)

Constructor.

Automatically calls Open() with given file name, mode and compression level.

Note
This constructor don't allow to use any advanced compression parameters or a dictionary. If you need to set any of them, please use simplified conventional constructor, set advanced parameters and use Open().

◆ CZipCloudflareCompressionFile() [3/3]

CZipCloudflareCompressionFile::CZipCloudflareCompressionFile ( ELevel  level = eLevel_Default)

Conventional constructor.

◆ CZipCloudflareCompressor()

CZipCloudflareCompressor::CZipCloudflareCompressor ( ELevel  level = eLevel_Default,
TZipFlags  flags = 0 
)

Constructor.

◆ CZipCloudflareDecompressor()

CZipCloudflareDecompressor::CZipCloudflareDecompressor ( TZipFlags  flags = 0)

Constructor.

◆ CZipCloudflareStreamCompressor() [1/3]

CZipCloudflareStreamCompressor::CZipCloudflareStreamCompressor ( CZipCloudflareCompression::ELevel  level,
CZipCloudflareCompression::TZipFlags  flags = 0 
)
inline

Conventional constructor.

Definition at line 773 of file zlib_cloudflare.hpp.

◆ CZipCloudflareStreamCompressor() [2/3]

CZipCloudflareStreamCompressor::CZipCloudflareStreamCompressor ( CZipCloudflareCompression::ELevel  level,
streamsize  in_bufsize,
streamsize  out_bufsize,
CZipCloudflareCompression::TZipFlags  flags = 0 
)
inline

Full constructor.

Definition at line 762 of file zlib_cloudflare.hpp.

◆ CZipCloudflareStreamCompressor() [3/3]

CZipCloudflareStreamCompressor::CZipCloudflareStreamCompressor ( CZipCloudflareCompression::TZipFlags  flags = 0)
inline

Conventional constructor.

Definition at line 783 of file zlib_cloudflare.hpp.

◆ CZipCloudflareStreamDecompressor() [1/2]

CZipCloudflareStreamDecompressor::CZipCloudflareStreamDecompressor ( CZipCloudflareCompression::TZipFlags  flags = 0)
inline

Conventional constructor.

Definition at line 824 of file zlib_cloudflare.hpp.

◆ CZipCloudflareStreamDecompressor() [2/2]

CZipCloudflareStreamDecompressor::CZipCloudflareStreamDecompressor ( streamsize  in_bufsize,
streamsize  out_bufsize,
CZipCloudflareCompression::TZipFlags  flags = 0 
)
inline

Full constructor.

Definition at line 814 of file zlib_cloudflare.hpp.

◆ CZipCompression() [1/2]

CZipCompression::CZipCompression ( const CZipCompression )
private

Private copy constructor to prohibit copy.

◆ CZipCompression() [2/2]

CZipCompression::CZipCompression ( ELevel  level = eLevel_Default)

Constructor.

Note
For setting up advanced compression parameters see Set*() methods.

◆ CZipCompressionFile() [1/3]

CZipCompressionFile::CZipCompressionFile ( const CZipCompressionFile )
private

Private copy constructor to prohibit copy.

◆ CZipCompressionFile() [2/3]

CZipCompressionFile::CZipCompressionFile ( const string file_name,
EMode  mode,
ELevel  level = eLevel_Default 
)

Constructor.

Automatically calls Open() with given file name, mode and compression level.

Note
This constructor don't allow to use any advanced compression parameters or a dictionary. If you need to set any of them, please use simplified conventional constructor, set advanced parameters and use Open().

◆ CZipCompressionFile() [3/3]

CZipCompressionFile::CZipCompressionFile ( ELevel  level = eLevel_Default)

Conventional constructor.

◆ CZipCompressor()

CZipCompressor::CZipCompressor ( ELevel  level = eLevel_Default,
TZipFlags  flags = 0 
)

Constructor.

◆ CZipDecompressor()

CZipDecompressor::CZipDecompressor ( TZipFlags  flags = 0)

Constructor.

◆ CZipStreamCompressor() [1/3]

CZipStreamCompressor::CZipStreamCompressor ( CZipCompression::ELevel  level,
CZipCompression::TZipFlags  flags = 0 
)
inline

Conventional constructor.

Definition at line 779 of file zlib.hpp.

◆ CZipStreamCompressor() [2/3]

CZipStreamCompressor::CZipStreamCompressor ( CZipCompression::ELevel  level,
streamsize  in_bufsize,
streamsize  out_bufsize,
CZipCompression::TZipFlags  flags = 0 
)
inline

Full constructor.

Definition at line 768 of file zlib.hpp.

◆ CZipStreamCompressor() [3/3]

CZipStreamCompressor::CZipStreamCompressor ( CZipCompression::TZipFlags  flags = 0)
inline

Conventional constructor.

Definition at line 789 of file zlib.hpp.

◆ CZipStreamDecompressor() [1/2]

CZipStreamDecompressor::CZipStreamDecompressor ( CZipCompression::TZipFlags  flags = 0)
inline

Conventional constructor.

Definition at line 830 of file zlib.hpp.

◆ CZipStreamDecompressor() [2/2]

CZipStreamDecompressor::CZipStreamDecompressor ( streamsize  in_bufsize,
streamsize  out_bufsize,
CZipCompression::TZipFlags  flags = 0 
)
inline

Full constructor.

Definition at line 820 of file zlib.hpp.

◆ DecompressBlock()

int CLZOCompression::DecompressBlock ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t *  dst_len,
TLZOFlags  flags 
)
protected

◆ DecompressBlockStream()

int CLZOCompression::DecompressBlockStream ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t *  dst_len,
TLZOFlags  flags,
size_t *  processed 
)
protected

Decompress block of data for stream format (fStreamFormat flag).

Returns
Return decompressor error code.

Definition at line 454 of file lzo.cpp.

References CLZOCompression::DecompressBlock(), flags, CCompressionUtil::GetUI4(), and CCompression::SetError().

Referenced by CLZOCompression::DecompressBuffer().

◆ DecompressBuffer() [1/5]

virtual bool CBZip2Compression::DecompressBuffer ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t  dst_size,
size_t *  dst_len 
)
virtual

Decompress data in the buffer.

Parameters
src_bufSource buffer.
src_lenSize of data in source buffer.
dst_bufDestination buffer.
dst_sizeSize of destination buffer. It must be large enough to hold all of the uncompressed data for the operation to complete.
dst_lenSize of decompressed data in destination buffer.
Returns
Return TRUE if operation was successfully or FALSE otherwise. On success, 'dst_buf' contains decompressed data of dst_len size.
See also
CompressBuffer

Implements ICompression.

Referenced by CT_DecompressBuffer().

◆ DecompressBuffer() [2/5]

bool CLZOCompression::DecompressBuffer ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t  dst_size,
size_t *  dst_len 
)
virtual

Decompress data in the buffer.

Parameters
src_bufSource buffer.
src_lenSize of data in source buffer.
dst_bufDestination buffer.
dst_sizeSize of destination buffer. It must be large enough to hold all of the uncompressed data for the operation to complete.
dst_lenSize of decompressed data in destination buffer.
Returns
Return TRUE if operation was successfully or FALSE otherwise. On success, 'dst_buf' contains decompressed data of dst_len size.
Note
Use fStreamFormat flag to decompress data, compressed using streams, or CompressBuffer() with this flag.
See also
CompressBuffer

Implements ICompression.

Definition at line 586 of file lzo.cpp.

References CLZOCompression::DecompressBlock(), CLZOCompression::DecompressBlockStream(), ERR_COMPRESS, F_ISSET, CLZOCompression::fAllowEmptyData, CLZOCompression::fAllowTransparentRead, CLZOCompression::FormatErrorMessage(), CLZOCompression::fStreamFormat, CCompression::GetFlags(), kMax_UInt, min(), n, NULL, s_CheckLZOHeader(), and CCompression::SetError().

Referenced by CT_DecompressBuffer(), CChangePhyloTreeCommand::Execute(), and CChangePhyloTreeCommand::Unexecute().

◆ DecompressBuffer() [3/5]

virtual bool CZipCompression::DecompressBuffer ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t  dst_size,
size_t *  dst_len 
)
virtual

Decompress data in the buffer.

Note
The decompressor stops and returns TRUE, if it find logical end in the compressed data, even not all compressed data was processed. Only for case of decompressing concatenated gzip files in memory it try to decompress data behind of logical end of recurrent gzip chunk, to check on next portion of data. See fCheckFileHeader, fAllowConcatenatedGZip and fGZip flags description.
Parameters
src_bufSource buffer.
src_lenSize of data in source buffer.
dst_bufDestination buffer. It must be large enough to hold all of the uncompressed data for the operation to complete.
dst_sizeSize of destination buffer.
dst_lenSize of decompressed data in destination buffer.
Returns
Return TRUE if operation was successfully or FALSE otherwise. On success, 'dst_buf' contains decompressed data of dst_len size.
See also
CompressBuffer, EFlags

Implements ICompression.

Referenced by CT_DecompressBuffer(), and CResultZBtSrcX::ReadLength().

◆ DecompressBuffer() [4/5]

virtual bool CZipCloudflareCompression::DecompressBuffer ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t  dst_size,
size_t *  dst_len 
)
virtual

Decompress data in the buffer.

Note
The decompressor stops and returns TRUE, if it find logical end in the compressed data, even not all compressed data was processed. Only for case of decompressing concatenated gzip files in memory it try to decompress data behind of logical end of recurrent gzip chunk, to check on next portion of data. See fCheckFileHeader, fAllowConcatenatedGZip and fGZip flags description.
Parameters
src_bufSource buffer.
src_lenSize of data in source buffer.
dst_bufDestination buffer. It must be large enough to hold all of the uncompressed data for the operation to complete.
dst_sizeSize of destination buffer.
dst_lenSize of decompressed data in destination buffer.
Returns
Return TRUE if operation was successfully or FALSE otherwise. On success, 'dst_buf' contains decompressed data of dst_len size.
See also
CompressBuffer, EFlags

Implements ICompression.

◆ DecompressBuffer() [5/5]

virtual bool ICompression::DecompressBuffer ( const void *  src_buf,
size_t  src_len,
void *  dst_buf,
size_t  dst_size,
size_t *  dst_len 
)
pure virtual

◆ DecompressCache()

bool CLZODecompressor::DecompressCache ( void  )
protected

◆ DecompressFile() [1/5]

virtual bool ICompression::DecompressFile ( 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 
)
pure virtual

◆ DecompressFile() [2/5]

virtual bool CBZip2Compression::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 
)
virtual

Decompress file.

Parameters
src_fileFile name of source file.
dst_fileFile name of result file.
file_io_bufsizeSize of the buffer used to read from a source file. Writing happens immediately on receiving some data from a decompressor.
decompression_in_bufsizeSize of the internal buffer holding input data to be decompressed. It can be different from 'file_io_bufsize' depending on a using compression method, OS and file system.
decompression_out_bufsizeSize of the internal buffer to receive data from a decompressor.
Returns
Return TRUE on success, FALSE on error.
See also
CompressFile, GetRecommendedBufferSizes, CBZip2CompressionFile

Implements ICompression.

◆ DecompressFile() [3/5]

bool CLZOCompression::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 
)
virtual

Decompress file.

Parameters
src_fileFile name of source file.
dst_fileFile name of result file.
file_io_bufsizeSize of the buffer used to read from a source file. Writing happens immediately on receiving some data from a decompressor.
decompression_in_bufsizeSize of the internal buffer holding input data to be decompressed. It can be different from 'file_io_bufsize' depending on a using compression method, OS and file system.
decompression_out_bufsizeSize of the internal buffer to receive data from a decompressor.
Returns
Return TRUE on success, FALSE on error.
See also
CompressFile, GetRecommendedBufferSizes, CLZOCompressionFile

Implements ICompression.

Definition at line 762 of file lzo.cpp.

References CLZOCompressionFile::Close(), CCompressionFile::eMode_Read, CLZOCompression::GetBlockSize(), CCompression::GetErrorCode(), CCompression::GetErrorDescription(), CCompression::GetFlags(), CLZOCompression::GetLevel(), CLZOCompressionFile::Open(), CLZOCompression::SetBlockSize(), CCompression::SetError(), CCompression::SetFlags(), and CCompression::x_DecompressFile().

◆ DecompressFile() [4/5]

virtual bool CZipCompression::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 
)
virtual

Decompress file.

Parameters
src_fileFile name of source file.
dst_fileFile name of result file.
file_io_bufsizeSize of the buffer used to read from a source file. Writing happens immediately on receiving some data from a decompressor.
decompression_in_bufsizeSize of the internal buffer holding input data to be decompressed. It can be different from 'file_io_bufsize' depending on a using compression method, OS and file system.
decompression_out_bufsizeSize of the internal buffer to receive data from a decompressor.
Returns
Return TRUE on success, FALSE on error.
See also
CompressFile, DecompressFileIntoDir, GetRecommendedBufferSizes, CZipCompressionFile
Note
CompressFile() method, as well as some gzip utilities, always keeps the original file name and timestamp in the compressed file. If fRestoreFileAttr flag is set, that timestamp, stored in the file header will be restored. The original file name cannot be restored here, see DecompressFileIntoDir().

Implements ICompression.

◆ DecompressFile() [5/5]

virtual bool CZipCloudflareCompression::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 
)
virtual

Decompress file.

Parameters
src_fileFile name of source file.
dst_fileFile name of result file.
file_io_bufsizeSize of the buffer used to read from a source file. Writing happens immediately on receiving some data from a decompressor.
decompression_in_bufsizeSize of the internal buffer holding input data to be decompressed. It can be different from 'file_io_bufsize' depending on a using compression method, OS and file system.
decompression_out_bufsizeSize of the internal buffer to receive data from a decompressor.
Returns
Return TRUE on success, FALSE on error.
See also
CompressFile, DecompressFileIntoDir, GetRecommendedBufferSizes, CZipCloudflareCompressionFile
Note
CompressFile() method, as well as some gzip utilities, always keeps the original file name and timestamp in the compressed file. If fRestoreFileAttr flag is set, that timestamp, stored in the file header will be restored. The original file name cannot be restored here, see DecompressFileIntoDir().

Implements ICompression.

◆ DecompressFileIntoDir() [1/2]