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::fIgnoreNameCase = (1<<24) , CTar::fConflictOverwrite = (1<<25) , CTar::fStreamPipeThrough = (1<<28) ,
  CTar::fTarfileNoTruncate = (1<<29) , CTar::fStandardHeaderOnly = (1<<30) , 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, size_t compression_in_bufsize=kCompressionDefaultBufSize, size_t compression_out_bufsize=kCompressionDefaultBufSize)
 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, size_t compression_in_bufsize=kCompressionDefaultBufSize, size_t compression_out_bufsize=kCompressionDefaultBufSize)
 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
 
const stringCTarEntryInfo::GetPath (void) 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, size_t compression_in_bufsize=kCompressionDefaultBufSize, size_t compression_out_bufsize=kCompressionDefaultBufSize)
 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, size_t compression_in_bufsize=kCompressionDefaultBufSize, size_t compression_out_bufsize=kCompressionDefaultBufSize)
 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...
 
string CTarEntryInfo::m_Path
 Iff filesystem involved in processing. 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 397 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 402 of file tar.hpp.

◆ TFiles

typedef list<TFile> CTar::TFiles

Definition at line 403 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 368 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 672 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 
fIgnoreNameCase 

Ignore case difference in names.

fConflictOverwrite 

Conflict overwrite allowed for entries.

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 304 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 379 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 666 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 683 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 451 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 489 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 679 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 729 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 678 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 724 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 672 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 718 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
The base directory and name masks (if any set with SetBaseDir() or SetMask(), respectively) are all ignored.
Returns
A list (containing this one entry) with full archive info filled in
See also
Append

Definition at line 827 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.

Warning
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 820 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,
size_t  compression_in_bufsize = kCompressionDefaultBufSize,
size_t  compression_out_bufsize = kCompressionDefaultBufSize 
)

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().
Current implementation uses default bzip2 methods to work with compression files, so in/out buffer sizes are not used, and added for API uniformity only.

◆ 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.

Uses default buffer sizes for I/O, that can be not ideal for some scenarios.

Definition at line 531 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 519 of file bzip2.hpp.

◆ CBZip2StreamCompressor() [3/3]

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

Conventional constructor.

Uses default buffer sizes for I/O, that can be not ideal for some scenarios.

Definition at line 542 of file bzip2.hpp.

◆ CBZip2StreamDecompressor() [1/2]

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

Conventional constructor.

Uses default buffer sizes for I/O, that can be not ideal for some scenarios.

Definition at line 579 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 568 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 660 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 814 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 1078 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,
size_t  compression_in_bufsize = kCompressionDefaultBufSize,
size_t  compression_out_bufsize = kCompressionDefaultBufSize 
)

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 887 of file lzo.cpp.

◆ CLZOCompressor()

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

Constructor.

Definition at line 1112 of file lzo.cpp.

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

◆ CLZODecompressor()

CLZODecompressor::CLZODecompressor ( TLZOFlags  flags)

Constructor.

Definition at line 1343 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.

Uses default buffer sizes for I/O, that can be not ideal for some scenarios.

Definition at line 787 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 775 of file lzo.hpp.

◆ CLZOStreamCompressor() [3/3]

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

Conventional constructor.

Uses default buffer sizes for I/O, that can be not ideal for some scenarios.

Definition at line 798 of file lzo.hpp.

◆ CLZOStreamDecompressor() [1/2]

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

Conventional constructor.

Uses default buffer sizes for I/O, that can be not ideal for some scenarios.

Definition at line 838 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 808 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 1327 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 1308 of file tar.cpp.

References CTar::x_Init().

Referenced by CTar::Extract().

◆ CTarEntryInfo()

CTarEntryInfo::CTarEntryInfo ( Uint8  pos = 0)
inlineprotected

Definition at line 243 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,
size_t  compression_in_bufsize = kCompressionDefaultBufSize,
size_t  compression_out_bufsize = kCompressionDefaultBufSize 
)

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.

Uses default buffer sizes for I/O, that can be not ideal for some scenarios.

Definition at line 772 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 760 of file zlib_cloudflare.hpp.

◆ CZipCloudflareStreamCompressor() [3/3]

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

Conventional constructor.

Uses default buffer sizes for I/O, that can be not ideal for some scenarios.

Definition at line 783 of file zlib_cloudflare.hpp.

◆ CZipCloudflareStreamDecompressor() [1/2]

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

Conventional constructor.

Uses default buffer sizes for I/O, that can be not ideal for some scenarios.

Definition at line 825 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,
size_t  compression_in_bufsize = kCompressionDefaultBufSize,
size_t  compression_out_bufsize = kCompressionDefaultBufSize 
)

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.

Uses default buffer sizes for I/O, that can be not ideal for some scenarios.

Definition at line 778 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 766 of file zlib.hpp.

◆ CZipStreamCompressor() [3/3]

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

Conventional constructor.

Uses default buffer sizes for I/O, that can be not ideal for some scenarios.

Definition at line 789 of file zlib.hpp.

◆ CZipStreamDecompressor() [1/2]

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

Conventional constructor.

Uses default buffer sizes for I/O, that can be not ideal for some scenarios.

Definition at line 831 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]

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 
)
virtual

Decompress file into specified directory.

Parameters
src_fileFile name of source file.
dst_dirDestination directory.
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, DecompressFile, 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 original file name and timestamp, stored in the file header will be restored. If not, that destination file will be named as archive name without extension.

◆ DecompressFileIntoDir() [2/2]

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 
)
virtual

Decompress file into specified directory.

Parameters
src_fileFile name of source file.
dst_dirDestination directory.
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, DecompressFile, 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 original file name and timestamp, stored in the file header will be restored. If not, that destination file will be named as archive name without extension.

◆ End() [1/9]

virtual EStatus CBZip2Compressor::End ( int  abandon = 0)
protectedvirtual

Free all dynamically allocated data structures.

This function discards any unprocessed input and does not flush any pending output.

Parameters
abandonIf this parameter is not zero that skip all error checks, always return eStatus_Success. Use it if Process/Flush/Finish where not called to perform any compression/decompression after Init().

Implements CCompressionProcessor.

◆ End() [2/9]

virtual EStatus CBZip2Decompressor::End ( int  abandon = 0)
protectedvirtual

Free all dynamically allocated data structures.

This function discards any unprocessed input and does not flush any pending output.

Parameters
abandonIf this parameter is not zero that skip all error checks, always return eStatus_Success. Use it if Process/Flush/Finish where not called to perform any compression/decompression after Init().

Implements CCompressionProcessor.

◆ End() [3/9]

CCompressionProcessor::EStatus CLZOCompressor::End ( int  abandon = 0)
protectedvirtual

Free all dynamically allocated data structures.

This function discards any unprocessed input and does not flush any pending output.

Parameters
abandonIf this parameter is not zero that skip all error checks, always return eStatus_Success. Use it if Process/Flush/Finish where not called to perform any compression/decompression after Init().

Implements CCompressionProcessor.

Definition at line 1309 of file lzo.cpp.

References CCompressionProcessor::eStatus_Success, CCompressionProcessor::SetBusy(), and CCompression::SetError().

Referenced by CLZOCompressor::~CLZOCompressor().

◆ End() [4/9]

CCompressionProcessor::EStatus CLZODecompressor::End ( int  abandon = 0)
protectedvirtual

Free all dynamically allocated data structures.

This function discards any unprocessed input and does not flush any pending output.

Parameters
abandonIf this parameter is not zero that skip all error checks, always return eStatus_Success. Use it if Process/Flush/Finish where not called to perform any compression/decompression after Init().

Implements CCompressionProcessor.

Definition at line 1604 of file lzo.cpp.

References CCompressionProcessor::eStatus_Success, CCompressionProcessor::SetBusy(), and CCompression::SetError().

◆ End() [5/9]

virtual EStatus CZipCompressor::End ( int  abandon = 0)
protectedvirtual

Free all dynamically allocated data structures.

This function discards any unprocessed input and does not flush any pending output.

Parameters
abandonIf this parameter is not zero that skip all error checks, always return eStatus_Success. Use it if Process/Flush/Finish where not called to perform any compression/decompression after Init().

Implements CCompressionProcessor.

◆ End() [6/9]

virtual EStatus CZipDecompressor::End ( int  abandon = 0)
protectedvirtual

Free all dynamically allocated data structures.

This function discards any unprocessed input and does not flush any pending output.

Parameters
abandonIf this parameter is not zero that skip all error checks, always return eStatus_Success. Use it if Process/Flush/Finish where not called to perform any compression/decompression after Init().

Implements CCompressionProcessor.

◆ End() [7/9]

virtual EStatus CZipCloudflareCompressor::End ( int  abandon = 0)
protectedvirtual

Free all dynamically allocated data structures.

This function discards any unprocessed input and does not flush any pending output.

Parameters
abandonIf this parameter is not zero that skip all error checks, always return eStatus_Success. Use it if Process/Flush/Finish where not called to perform any compression/decompression after Init().

Implements CCompressionProcessor.

◆ End() [8/9]

virtual EStatus CZipCloudflareDecompressor::End ( int  abandon = 0)
protectedvirtual

Free all dynamically allocated data structures.

This function discards any unprocessed input and does not flush any pending output.

Parameters
abandonIf this parameter is not zero that skip all error checks, always return eStatus_Success. Use it if Process/Flush/Finish where not called to perform any compression/decompression after Init().

Implements CCompressionProcessor.

◆ End() [9/9]

virtual EStatus CCompressionProcessor::End ( int  abandon = 0)
protectedpure virtual

Free all dynamically allocated data structures.

This function discards any unprocessed input and does not flush any pending output.

Parameters
abandonIf this parameter is not zero that skip all error checks, always return eStatus_Success. Use it if Process/Flush/Finish where not called to perform any compression/decompression after Init().

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

Referenced by CCompressionStreamProcessor::Init().

◆ EstimateArchiveSize()

Uint8 CTar::EstimateArchiveSize ( const TFiles files,
size_t  blocking_factor = 20,
const string base_dir = kEmptyStr 
)
static

Return archive size as if all specified input entries were put in it.

Note that the return value is not the exact but the upper bound of what the archive size can be expected. This call does not recurse into any subdirectories but relies solely upon the information as passed via the parameter.

The returned size includes all necessary alignments and padding.

Returns
An upper estimate of archive size given that all specified files were stored in it (the actual size may turn out to be smaller).

Definition at line 4610 of file tar.cpp.

References ALIGN_SIZE, BLOCK_SIZE, buffer_size, f(), ITERATE, STarHeader::name, padding, prefix, result, s_BaseDir(), s_ToArchiveName(), s_ToFilesystemPath(), and SIZE_OF.

◆ EstimateCompressionBufferSize() [1/6]

size_t CLZOCompression::EstimateCompressionBufferSize ( size_t  src_len)
virtual

Estimate buffer size for data compression.

Simplified method for estimation of the size of buffer required to compress specified number of bytes of data, uses current block size and flags.

See also
EstimateCompressionBufferSize, CompressBuffer

Implements ICompression.

Definition at line 676 of file lzo.cpp.

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

Referenced by CChangePhyloTreeCommand::CChangePhyloTreeCommand(), CLZOCompression::CompressBuffer(), CLZOCompressor::Init(), and CLZODecompressor::Process().

◆ EstimateCompressionBufferSize() [2/6]

virtual size_t CZipCompression::EstimateCompressionBufferSize ( size_t  src_len)
virtual

Estimate buffer size for data compression.

The function shall estimate the size of buffer required to compress specified number of bytes of data using the CompressBuffer() function. This function may return a conservative value that may be larger than 'src_len'.

Parameters
src_lenSize of data in source buffer.
Returns
Estimated buffer size. 0 if unable to determine.
Note
This method ignores used dictionary.
See also
CompressBuffer

Implements ICompression.

◆ EstimateCompressionBufferSize() [3/6]

virtual size_t CZipCloudflareCompression::EstimateCompressionBufferSize ( size_t  src_len)
virtual

Estimate buffer size for data compression.

The function shall estimate the size of buffer required to compress specified number of bytes of data using the CompressBuffer() function. This function may return a conservative value that may be larger than 'src_len'.

Parameters
src_lenSize of data in source buffer.
Returns
Estimated buffer size. 0 if unable to determine.
Note
This method ignores used dictionary.
See also
CompressBuffer

Implements ICompression.

◆ EstimateCompressionBufferSize() [4/6]

virtual size_t ICompression::EstimateCompressionBufferSize ( size_t  src_len)
pure virtual

Estimate buffer size for data compression (if supported).

Implemented in CBZip2Compression, CZipCloudflareCompression, CZipCompression, and CLZOCompression.

◆ EstimateCompressionBufferSize() [5/6]

size_t CLZOCompression::EstimateCompressionBufferSize ( size_t  src_len,
size_t  blocksize,
TLZOFlags  flags 
)
static

Estimate buffer size for data compression (advanced version).

The function shall estimate the size of buffer required to compress specified number of bytes of data. This function return a conservative value that larger than 'src_len'.

Parameters
src_lenSize of data in the source buffer. @blocksize Size of blocks that will be used for compression. Value 0 means default block size, same as GetBlockSizeDefault(). @flags Flags that will be used for compression.
Returns
Estimated buffer size.
See also
CompressBuffer, GetBlockSizeDefault

Definition at line 682 of file lzo.cpp.

References ESTIMATE, CLZOCompression::fChecksum, flags, CLZOCompression::fStreamFormat, CLZOCompression::GetBlockSizeDefault(), kMaxHeaderSize, n, and SIZEOF_VOIDP.

◆ EstimateCompressionBufferSize() [6/6]

virtual size_t CBZip2Compression::EstimateCompressionBufferSize ( size_t  )
inlinevirtual
Warning
No support for BZip2. Always return 0.
See also
HaveSupport

Implements ICompression.

Definition at line 154 of file bzip2.hpp.

◆ Extract() [1/3]

IReader * CTar::Extract ( CNcbiIstream is,
const string name,
CTar::TFlags  flags = fSkipUnsupported 
)
static

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).

The tar archive is deemed to be in the specified stream "is", properly positioned (either at the beginning of the archive, or at any CTarEntryInfo::GetPosition(ePos_Header)'s result possibly off-set with some fixed archive base position, e.g. if there is any preamble). The extraction is done at the first matching entry only, then stops.

Note
fStreamPipeThrough will be ignored if passed in flags. See test suite (in test/test_tar.cpp) for a usage example.
Returns
IReader interface to read the file contents with; 0 on error.
See also
CTarEntryInfo::GetPosition, Extract, SetMask, SetFlags, GetNextEntryInfo, GetNextEntryData, IReader, CRStream

Definition at line 4758 of file tar.cpp.

References _ASSERT, CTar::CTar(), CTar::CTarReader, CTarEntryInfo::eFile, CTar::eInternal, eTakeOwnership, CTarEntryInfo::eUnknown, flags, CTar::fSkipUnsupported, CTar::fStreamPipeThrough, and mask.

◆ Extract() [2/3]

unique_ptr< CArchive::TEntries > CArchive::Extract ( void  )
virtual

Extract the entire archive.

Extract all archive entries, whose names match the preset mask. Entries will be extracted into either current directory or a directory otherwise specified by SetBaseDir().

Returns
A list of entries that have been actually extracted.
See also
SetMask, SetBaseDir

Definition at line 342 of file archive.cpp.

References ARCHIVE_CHECK, CDirEntry::eDir, CArchive::eExtract, entries, F_ISSET, CArchive::fPreserveAll, ITERATE, CArchive::x_Open(), CArchive::x_ReadAndProcess(), and CArchive::x_RestoreAttrs().

◆ Extract() [3/3]

unique_ptr< CTar::TEntries > CTar::Extract ( void  )

Extract the entire archive (into either current directory or a directory otherwise specified by SetBaseDir()).

If the same-named files exist, they will be replaced (subject to fOverwrite) or backed up (fBackup), unless fUpdate is set, which would cause the replacement / backup only if the files are older than the archive entries. Note that if the fOverwrite bit is stripped, then no matching files will be updated / backed up / overwritten, but skipped.

Extract all archive entries, whose names match the pre-set mask.

Note
Unlike Append(), extracting a matching directory does *not* automatically extract all files within: for them to be extracted, they still must match the mask. So if there is a directory "dir/" stored in the archive, the extract mask can be "dir/*" for the entire subtree to be extracted. Note that "dir/" will only extract the directory itself, and "dir" won't cause that directory to be extracted at all (mismatch due to the trailing slash '/' missing).
Returns
A list of entries that have been actually extracted.
See also
SetMask, SetBaseDir, SetFlags

Definition at line 1632 of file tar.cpp.

References CTarEntryInfo::eDir, CTar::eExtract, entries, CTar::fPreserveAll, ITERATE, CTar::m_Flags, CTar::x_Open(), CTar::x_ReadAndProcess(), and CTar::x_RestoreAttrs().

Referenced by CDownloadJob::x_DownloadAndExtract().

◆ ExtractEntry()

void CArchive::ExtractEntry ( const CDirEntry dst)
protectedvirtual

◆ ExtractEntryToCallback() [1/2]

void CArchiveZip::ExtractEntryToCallback ( const CArchiveEntryInfo info,
Callback_Write  callback 
)
virtual

Extracts an archive file using user-defined callback to process extracted data.

Do nothing for entries of other types.

Parameters
infoEntry to extract.
callbackUser callback for processing extracted data on the fly.
See also
ExtractEntryToFileSystem, ExtractEntryToMemory, CArchiveEntryInfo::GetSize

Implements IArchive.

Definition at line 443 of file archive_zip.cpp.

References _ASSERT, data, CDirEntry::eDir, IArchive::eRead, info, IArchive::m_Mode, mz_zip_reader_extract_to_callback(), s_ZipExtractCallback(), NStr::SizetToString(), ZIP_CHECK, ZIP_HANDLE, and ZIP_THROW.

◆ ExtractEntryToCallback() [2/2]

virtual void IArchive::ExtractEntryToCallback ( const CArchiveEntryInfo info,
Callback_Write  callback 
)
pure virtual

Extracts an archive file using user-defined callback to process extracted data.

Do nothing for entries of other types.

Parameters
infoEntry to extract.
callbackUser callback for processing extracted data on the fly.
See also
ExtractEntryToFileSystem, ExtractEntryToMemory, CArchiveEntryInfo::GetSize

Implemented in CArchiveZip.

◆ ExtractEntryToFileSystem() [1/2]

void CArchiveZip::ExtractEntryToFileSystem ( const CArchiveEntryInfo info,
const string dst_path 
)
virtual

Extracts an archive entry to file system.

Parameters
infoEntry to extract.
dst_pathDestination path for extracted entry.
Note
This method do not set last accessed and modified times. See CArchive.
See also
ExtractEntryToMemory, ExtractEntryToCallback, CArchiveEntryInfo::GetSize

Implements IArchive.

Definition at line 370 of file archive_zip.cpp.

References _ASSERT, CDirEntry::eDir, IArchive::eRead, info, IArchive::m_Mode, MZ_FCLOSE, MZ_FILE, MZ_FOPEN, mz_zip_file_write_callback(), mz_zip_reader_extract_to_callback(), NStr::SizetToString(), ZIP_CHECK, ZIP_HANDLE, and ZIP_THROW.

◆ ExtractEntryToFileSystem() [2/2]

virtual void IArchive::ExtractEntryToFileSystem ( const CArchiveEntryInfo info,
const string dst_path 
)
pure virtual

Extracts an archive entry to file system.

Parameters
infoEntry to extract.
dst_pathDestination path for extracted entry.
Note
This method do not set last accessed and modified times. See CArchive.
See also
ExtractEntryToMemory, ExtractEntryToCallback, CArchiveEntryInfo::GetSize

Implemented in CArchiveZip.

◆ ExtractEntryToMemory() [1/2]

void CArchiveZip::ExtractEntryToMemory ( const CArchiveEntryInfo info,
void *  buf,
size_t  size 
)
virtual

Extracts an archive file to a memory buffer.

Do nothing for entries of other types.

Parameters
infoEntry to extract.
bufMemory buffer for extracted data.
sizeSize of memory buffer. Note, that the buffer size should be big enough to fit whole extracted file.
See also
ExtractEntryToFileSystem, ExtractEntryToCallback, CArchiveEntryInfo::GetSize

Implements IArchive.

Definition at line 402 of file archive_zip.cpp.

References _ASSERT, buf, CDirEntry::eDir, IArchive::eRead, info, IArchive::m_Mode, mz_zip_reader_extract_to_mem(), ncbi::grid::netcache::search::fields::size, NStr::SizetToString(), ZIP_CHECK, ZIP_HANDLE, and ZIP_THROW.

◆ ExtractEntryToMemory() [2/2]

virtual void IArchive::ExtractEntryToMemory ( const CArchiveEntryInfo info,
void *  buf,
size_t  size 
)
pure virtual

Extracts an archive file to a memory buffer.

Do nothing for entries of other types.

Parameters
infoEntry to extract.
bufMemory buffer for extracted data.
sizeSize of memory buffer. Note, that the buffer size should be big enough to fit whole extracted file.
See also
ExtractEntryToFileSystem, ExtractEntryToCallback, CArchiveEntryInfo::GetSize

Implemented in CArchiveZip.

◆ ExtractFileToCallback()

void CArchive::ExtractFileToCallback ( const CArchiveEntryInfo info,
IArchive::Callback_Write  callback 
)
virtual

Extract single file entry using user-defined callback.

Parameters
info[in] Entry to extract.
callback[in] User callback for processing extracted data on the fly.
See also
ExtractFileToMemory, EctractFileToHeap, CArchiveEntryInfo::GetSize, List

Definition at line 434 of file archive.cpp.

References ARCHIVE, ARCHIVE_THROW_INFO, CArchive::eExtract, CDirEntry::eFile, CDirEntry::eUnknown, F_ISSET, CArchive::fSkipUnsupported, info, kEmptyStr, and CArchive::x_Open().

◆ ExtractFileToHeap()

void CArchive::ExtractFileToHeap ( const CArchiveEntryInfo info,
void **  buf_ptr,
size_t *  buf_size_ptr 
)
virtual

Extract single file entry to a dynamically allocated memory buffer.

Parameters
info[in] Entry to extract.
buf_ptr[out] Pointer to an allocated memory buffer.
buf_size_ptr[out] Size of allocated memory buffer, it is equal to the size of extracted data.
Note
Do not forget to deallocate memory buffer after usage. Use free() or AutoPtr<char, CDeleter<char>>.
See also
ExtractFileToMemory, EctractFileToCallback, CArchiveEntryInfo::GetSize, List

Definition at line 385 of file archive.cpp.

References ARCHIVE_CHECK, ARCHIVE_THROW, ARCHIVE_THROW_INFO, CDirEntry::eFile, CDirEntry::eUnknown, CArchive::ExtractFileToMemory(), F_ISSET, free(), CArchive::fSkipUnsupported, get_limits(), info, NStr::Int8ToString(), kEmptyStr, malloc(), NCBI_THROW, and NULL.

◆ ExtractFileToMemory()

void CArchive::ExtractFileToMemory ( const CArchiveEntryInfo info,
void *  buf,
size_t  buf_size,
size_t *  out_size 
)
virtual

Extract single file entry to a memory buffer.

Parameters
info[in] Entry to extract.
buf[in] Memory buffer for extracted data.
buf_size[in] Size of memory buffer.
out_size[out] Size of extracted data in the buffer.
Note
The buffer size should be big enough to fit whole extracted file.
See also
ExtractFileToHeap, EctractFileToCallback, CArchiveEntryInfo::GetSize, List

Definition at line 359 of file archive.cpp.

References ARCHIVE, ARCHIVE_CHECK, ARCHIVE_THROW_INFO, buf, CArchive::eExtract, CDirEntry::eFile, CDirEntry::eUnknown, F_ISSET, CArchive::fSkipUnsupported, info, kEmptyStr, NCBI_THROW, and CArchive::x_Open().

Referenced by CArchive::ExtractFileToHeap().

◆ Finalize()

void CArchiveMemory::Finalize ( void **  buf_ptr,
size_t *  buf_size_ptr 
)
virtual

Finalize the archive created in memory.

Return pointer to a buffer with created archive and its size. After this call you cannot write to archive anymore, but you can read from it. Returning pointer to buffer and its size also will be saved internally and used for opening archive for reading (see constructor).

Parameters
buf_ptrPointer to an archive located in memory.
buf_size_ptrSize of the newly created archive.
Note
Do not forget to deallocate memory buffer after usage. Use free() or AutoPtr<char, CDeleter<char>>.
See also
Create, Close

Definition at line 1194 of file archive.cpp.

References ARCHIVE, ARCHIVE_CHECK, CArchiveMemory::m_Buf, CArchiveMemory::m_BufSize, and NCBI_THROW.

◆ FinalizeMemory() [1/2]

void CArchiveZip::FinalizeMemory ( void **  buf,
size_t *  size 
)
virtual

Finalize the archive created in memory.

Return pointer to buffer with created archive and its size. The only valid operation after this call is Close().

Parameters
bufPointer to an archive located in memory.
sizeSize of the newly created archive.
Note
Do not forget to deallocate memory buffer after usage.
See also
CreateMemory, Close

Implements IArchive.

Definition at line 214 of file archive_zip.cpp.

References _ASSERT, buf, IArchive::eMemory, IArchive::eWrite, free(), IArchive::m_Location, IArchive::m_Mode, mz_zip_writer_finalize_heap_archive(), NULL, ncbi::grid::netcache::search::fields::size, ZIP_CHECK, ZIP_HANDLE, and ZIP_THROW.

◆ FinalizeMemory() [2/2]

virtual void IArchive::FinalizeMemory ( void **  buf,
size_t *  size 
)
pure virtual

Finalize the archive created in memory.

Return pointer to buffer with created archive and its size. The only valid operation after this call is Close().

Parameters
bufPointer to an archive located in memory.
sizeSize of the newly created archive.
Note
Do not forget to deallocate memory buffer after usage.
See also
CreateMemory, Close

Implemented in CArchiveZip.

◆ Finish() [1/9]

virtual EStatus CBZip2Compressor::Finish ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Finish the compression/decompression process.

Process pending input, flush pending output. This function slightly like to Flush(), but it must be called only at the end of compression process just before End().

Implements CCompressionProcessor.

◆ Finish() [2/9]

virtual EStatus CBZip2Decompressor::Finish ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Finish the compression/decompression process.

Process pending input, flush pending output. This function slightly like to Flush(), but it must be called only at the end of compression process just before End().

Implements CCompressionProcessor.

◆ Finish() [3/9]

CCompressionProcessor::EStatus CLZOCompressor::Finish ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

◆ Finish() [4/9]

CCompressionProcessor::EStatus CLZODecompressor::Finish ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

◆ Finish() [5/9]

virtual EStatus CZipCompressor::Finish ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Finish the compression/decompression process.

Process pending input, flush pending output. This function slightly like to Flush(), but it must be called only at the end of compression process just before End().

Implements CCompressionProcessor.

◆ Finish() [6/9]

virtual EStatus CZipDecompressor::Finish ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Finish the compression/decompression process.

Process pending input, flush pending output. This function slightly like to Flush(), but it must be called only at the end of compression process just before End().

Implements CCompressionProcessor.

◆ Finish() [7/9]

virtual EStatus CZipCloudflareCompressor::Finish ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Finish the compression/decompression process.

Process pending input, flush pending output. This function slightly like to Flush(), but it must be called only at the end of compression process just before End().

Implements CCompressionProcessor.

◆ Finish() [8/9]

virtual EStatus CZipCloudflareDecompressor::Finish ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Finish the compression/decompression process.

Process pending input, flush pending output. This function slightly like to Flush(), but it must be called only at the end of compression process just before End().

Implements CCompressionProcessor.

◆ Finish() [9/9]

virtual EStatus CCompressionProcessor::Finish ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedpure virtual

Finish the compression/decompression process.

Process pending input, flush pending output. This function slightly like to Flush(), but it must be called only at the end of compression process just before End().

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

◆ Flush() [1/9]

virtual EStatus CBZip2Compressor::Flush ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Flush compressed/decompressed data from the output buffer.

Flushing may degrade compression for some compression algorithms and so it should be used only when necessary.

Implements CCompressionProcessor.

◆ Flush() [2/9]

virtual EStatus CBZip2Decompressor::Flush ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Flush compressed/decompressed data from the output buffer.

Flushing may degrade compression for some compression algorithms and so it should be used only when necessary.

Implements CCompressionProcessor.

◆ Flush() [3/9]

CCompressionProcessor::EStatus CLZOCompressor::Flush ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Flush compressed/decompressed data from the output buffer.

Flushing may degrade compression for some compression algorithms and so it should be used only when necessary.

Implements CCompressionProcessor.

Definition at line 1205 of file lzo.cpp.

References CCompressionProcessor::eStatus_Overflow, CCompressionProcessor::eStatus_Success, CCompressionProcessor::IncreaseOutputSize(), CLZOBuffer::m_OutBegPtr, CLZOBuffer::m_OutBuf, CLZOBuffer::m_OutEndPtr, min(), and n.

Referenced by CLZOCompressor::Finish(), and CLZOCompressor::Process().

◆ Flush() [4/9]

CCompressionProcessor::EStatus CLZODecompressor::Flush ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Flush compressed/decompressed data from the output buffer.

Flushing may degrade compression for some compression algorithms and so it should be used only when necessary.

Implements CCompressionProcessor.

Definition at line 1519 of file lzo.cpp.

References CCompression::eMode_Unknown, CCompressionProcessor::eStatus_Overflow, CCompressionProcessor::eStatus_Success, CCompressionProcessor::IncreaseOutputSize(), CCompression::m_DecompressMode, CLZOBuffer::m_OutBegPtr, CLZOBuffer::m_OutBuf, CLZOBuffer::m_OutEndPtr, min(), and n.

Referenced by CLZODecompressor::Finish(), and CLZODecompressor::Process().

◆ Flush() [5/9]

virtual EStatus CZipCompressor::Flush ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Flush compressed/decompressed data from the output buffer.

Flushing may degrade compression for some compression algorithms and so it should be used only when necessary.

Implements CCompressionProcessor.

◆ Flush() [6/9]

virtual EStatus CZipDecompressor::Flush ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Flush compressed/decompressed data from the output buffer.

Flushing may degrade compression for some compression algorithms and so it should be used only when necessary.

Implements CCompressionProcessor.

◆ Flush() [7/9]

virtual EStatus CZipCloudflareCompressor::Flush ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Flush compressed/decompressed data from the output buffer.

Flushing may degrade compression for some compression algorithms and so it should be used only when necessary.

Implements CCompressionProcessor.

◆ Flush() [8/9]

virtual EStatus CZipCloudflareDecompressor::Flush ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedvirtual

Flush compressed/decompressed data from the output buffer.

Flushing may degrade compression for some compression algorithms and so it should be used only when necessary.

Implements CCompressionProcessor.

◆ Flush() [9/9]

virtual EStatus CCompressionProcessor::Flush ( char *  out_buf,
size_t  out_size,
size_t *  out_avail 
)
protectedpure virtual

Flush compressed/decompressed data from the output buffer.

Flushing may degrade compression for some compression algorithms and so it should be used only when necessary.

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

Referenced by CCompressionStreambuf::ProcessStreamRead().

◆ FormatErrorMessage() [1/4]

string CLZOCompression::FormatErrorMessage ( string  where) const
protected

◆ FormatErrorMessage() [2/4]

string CBZip2Compression::FormatErrorMessage ( string  where,
bool  use_stream_data = true 
) const
protected

Format string with last error description.

◆ FormatErrorMessage() [3/4]

string CZipCompression::FormatErrorMessage ( string  where,
size_t  pos = 0 
) const
protected

Format string with last error description.

If pos == 0, that use internal m_Stream's position to report.

◆ FormatErrorMessage() [4/4]

string CZipCloudflareCompression::FormatErrorMessage ( string  where,
size_t  pos = 0 
) const
protected

Format string with last error description.

If pos == 0, that use internal m_Stream's position to report.

◆ Free()

void CCompressionDictionary::Free ( void  )

◆ g_GZip_Cloudflare_ScanForChunks()

void g_GZip_Cloudflare_ScanForChunks ( CNcbiIstream is,
IChunkHandler handler 
)

Get list of positions of separate gzip files in the concatenated gzip file.

Return results via user defined handler. Throw CCoreException/CCompressionException on error.

Parameters
isOpened input stream to scan (should be opened in binary mode).
handlerCall handler's IChunkHandler::OnChunk() method and pass position of each new gzip file inside a stream and size of uncompressed data on that moment.
Note
This method don't support concatenated .gz files compressed with a dictionary.

◆ g_GZip_ScanForChunks()

void g_GZip_ScanForChunks ( CNcbiIstream is,
IChunkHandler handler 
)

Get list of positions of separate gzip files in the concatenated gzip file.

Return results via user defined handler. Throw CCoreException/CCompressionException on error.

Parameters
isOpened input stream to scan (should be opened in binary mode).
handlerCall handler's IChunkHandler::OnChunk() method and pass position of each new gzip file inside a stream and size of uncompressed data on that moment.
Note
This method don't support concatenated .gz files compressed with a dictionary.

Referenced by CLDS2_UrlHandler_GZipFile::SaveChunks().

◆ GetBaseDir() [1/2]

virtual const string& CArchive::GetBaseDir ( void  ) const
inlinevirtual

Get base directory to use for files while extracting from/adding to the archive, and in the latter case used only for relative paths.

See also
SetBaseDir

Definition at line 299 of file archive.hpp.

References CArchive::m_BaseDir.

◆ GetBaseDir() [2/2]

const string & CTar::GetBaseDir ( void  ) const
inline

Get base directory to use for files while extracting from/adding to the archive, and in the latter case used only for relative paths.

See also
SetBaseDir

Definition at line 873 of file tar.hpp.

References CTar::m_BaseDir.

◆ GetBlockSize()

size_t CLZOCompression::GetBlockSize ( void  ) const
inline

◆ GetBlockSizeDefault()

size_t CLZOCompression::GetBlockSizeDefault ( void  )
static

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.

But you can use any value if you think that it works better for you.

See also
CCompressionStreambuf::CCompressionStreambuf

Definition at line 850 of file lzo.cpp.

Referenced by CLZOCompression::CLZOCompression(), and CLZOCompression::EstimateCompressionBufferSize().

◆ GetBlockSizeMax()

size_t CLZOCompression::GetBlockSizeMax ( void  )
static

LZO can compress/decompress data limited by its 'lzo_uint' type.

Definition at line 858 of file lzo.cpp.

References max().

◆ GetBlockSizeMin()

size_t CLZOCompression::GetBlockSizeMin ( void  )
static

This is an artifical limit.

You can use block size as low as 1, but overhead will be too big for practical reasons.

Definition at line 855 of file lzo.cpp.

◆ GetBZip2ErrorDescription()

const char* CBZip2Compression::GetBZip2ErrorDescription ( int  errcode)
protected

Get error description for specified error code.

◆ GetComment()

const string& CArchiveEntryInfo::GetComment ( void  ) const
inline

Definition at line 140 of file archive_.hpp.

References CArchiveEntryInfo::m_Comment.

◆ GetCompressor() [1/4]

CBZip2Compressor* CBZip2StreamCompressor::GetCompressor ( void  ) const
inline

Return a pointer to compressor.

Can be used mostly for setting an advanced compression-specific parameters.

Definition at line 550 of file bzip2.hpp.

References CCompressionStreamProcessor::GetProcessor().

◆ GetCompressor() [2/4]

CLZOCompressor* CLZOStreamCompressor::GetCompressor ( void  ) const
inline

Return a pointer to compressor.

Can be used mostly for setting an advanced compression-specific parameters.

Definition at line 806 of file lzo.hpp.

References CCompressionStreamProcessor::GetProcessor().

◆ GetCompressor() [3/4]

CZipCompressor* CZipStreamCompressor::GetCompressor ( void  ) const
inline

Return a pointer to compressor.

Can be used mostly for setting an advanced compression-specific parameters.

Definition at line 797 of file zlib.hpp.

References CCompressionStreamProcessor::GetProcessor().

Referenced by Serialize< string, float >().

◆ GetCompressor() [4/4]

CZipCloudflareCompressor* CZipCloudflareStreamCompressor::GetCompressor ( void  ) const
inline

Return a pointer to compressor.

Can be used mostly for setting an advanced compression-specific parameters.

Definition at line 791 of file zlib_cloudflare.hpp.

References CCompressionStreamProcessor::GetProcessor().

◆ GetCreationCTime()

CTime CTarEntryInfo::GetCreationCTime ( void  ) const
inline

◆ GetCreationTime() [1/2]

time_t CArchiveEntryInfo::GetCreationTime ( void  ) const
inline

Definition at line 144 of file archive_.hpp.

References CArchiveEntryInfo::m_Stat.

◆ GetCreationTime() [2/2]

time_t CTarEntryInfo::GetCreationTime ( void  ) const
inline

Definition at line 205 of file tar.hpp.

References CTarEntryInfo::m_Stat, and CDirEntry::SStat::orig.

◆ GetCurrentPosition()

Uint8 CTar::GetCurrentPosition ( void  ) const
inline

Get current stream position.

Definition at line 867 of file tar.hpp.

References CTar::m_StreamPos.

◆ GetData()

const void* CCompressionDictionary::GetData ( void  )
inline

Return pointer to the dictionary data.

Definition at line 437 of file compress.hpp.

References CCompressionDictionary::m_Data.

◆ GetDecompressor() [1/4]

CBZip2Decompressor* CBZip2StreamDecompressor::GetDecompressor ( void  ) const
inline

Return a pointer to compressor.

Can be used mostly for setting an advanced compression-specific parameters.

Definition at line 587 of file bzip2.hpp.

References CCompressionStreamProcessor::GetProcessor().

◆ GetDecompressor() [2/4]

CLZODecompressor* CLZOStreamDecompressor::GetDecompressor ( void  ) const
inline

Return a pointer to decompressor.

Can be used mostly for setting an advanced compression-specific parameters.

Definition at line 846 of file lzo.hpp.

References CCompressionStreamProcessor::GetProcessor().

◆ GetDecompressor() [3/4]

CZipDecompressor* CZipStreamDecompressor::GetDecompressor ( void  ) const
inline

Return a pointer to decompressor.

Can be used mostly for setting an advanced compression-specific parameters.

Definition at line 839 of file zlib.hpp.

References CCompressionStreamProcessor::GetProcessor().

Referenced by Deserialize< string, float >().

◆ GetDecompressor() [4/4]

CZipCloudflareDecompressor* CZipCloudflareStreamDecompressor::GetDecompressor ( void  ) const
inline

Return a pointer to decompressor.

Can be used mostly for setting an advanced compression-specific parameters.

Definition at line 833 of file zlib_cloudflare.hpp.

References CCompressionStreamProcessor::GetProcessor().

◆ GetDefaultLevel() [1/5]

virtual ELevel CBZip2Compression::GetDefaultLevel ( void  ) const
inlinevirtual

Return default compression level for a compression algorithm.

Implements ICompression.

Definition at line 92 of file bzip2.hpp.

References ICompression::eLevel_VeryHigh.

◆ GetDefaultLevel() [2/5]

virtual ELevel CLZOCompression::GetDefaultLevel ( void  ) const
inlinevirtual

Returns default compression level for a compression algorithm.

Implements ICompression.

Definition at line 186 of file lzo.hpp.

References ICompression::eLevel_Lowest.

◆ GetDefaultLevel() [3/5]

virtual ELevel CZipCompression::GetDefaultLevel ( void  ) const
inlinevirtual

Returns default compression level for a compression algorithm.

Implements ICompression.

Definition at line 141 of file zlib.hpp.

References ICompression::eLevel_Default.

◆ GetDefaultLevel() [4/5]

virtual ELevel CZipCloudflareCompression::GetDefaultLevel ( void  ) const
inlinevirtual

Returns default compression level for a compression algorithm.

Implements ICompression.

Definition at line 135 of file zlib_cloudflare.hpp.

References ICompression::eLevel_Default.

◆ GetDefaultLevel() [5/5]

virtual ELevel ICompression::GetDefaultLevel ( void  ) const
pure virtual

Return the default compression level for current compression algorithm.

Implemented in CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.

Referenced by CCompression::GetLevel().

◆ GetEntryInfo() [1/2]

void CArchiveZip::GetEntryInfo ( size_t  index,
CArchiveEntryInfo info 
)
virtual

Get detailed information about an archive entry by index.

Parameters
indexZero-based index of entry in the archive.
infoPointer to entry information structure that will be filled with information about entry with specified index.
Note
Note that the archive can contain multiple versions of the same entry (in case if an update was done on it), all of which but the last one are to be ignored.
See also
CArchiveEntryInfo

Implements IArchive.

Definition at line 279 of file archive_zip.cpp.

References _ASSERT, CDirEntry::eDir, CDirEntry::eFile, IArchive::eRead, CDirEntry::eUnknown, CDirEntry::GetType(), info, kMax_UInt, mz_zip_archive_file_stat::m_comment, mz_zip_archive_file_stat::m_comment_size, mz_zip_archive_file_stat::m_comp_size, mz_zip_archive_file_stat::m_external_attr, mz_zip_archive_file_stat::m_filename, IArchive::m_Mode, mz_zip_archive_file_stat::m_time, mz_zip_archive_file_stat::m_uncomp_size, mz_zip_archive_file_stat::m_version_made_by, mz_zip_reader_file_stat(), mz_zip_reader_is_file_a_directory(), NCBI_THROW, NStr::SizetToString(), ZIP_CHECK, ZIP_HANDLE, and ZIP_THROW.

◆ GetEntryInfo() [2/2]

virtual void IArchive::GetEntryInfo ( size_t  index,
CArchiveEntryInfo info 
)
pure virtual

Get detailed information about an archive entry by index.

Parameters
indexZero-based index of entry in the archive.
infoPointer to entry information structure that will be filled with information about entry with specified index.
Note
Note that the archive can contain multiple versions of the same entry (in case if an update was done on it), all of which but the last one are to be ignored.
See also
CArchiveEntryInfo

Implemented in CArchiveZip.

◆ GetErrCodeString() [1/3]

virtual const char* CArchiveException::GetErrCodeString ( void  ) const
inlineoverridevirtual

◆ GetErrCodeString() [2/3]

virtual const char* CCompressionException::GetErrCodeString ( void  ) const
inlineoverridevirtual

Translate from the error code value to its string representation.

Reimplemented from CCoreException.

Definition at line 587 of file compress.hpp.

References CCompressionException::eCompression, CCompressionException::eCompressionFile, CCoreException::GetErrCode(), and CException::GetErrCodeString().

◆ GetErrCodeString() [3/3]

virtual const char* CTarException::GetErrCodeString ( void  ) const
inlineoverridevirtual

◆ GetErrorCode() [1/2]

int CCompression::GetErrorCode ( void  ) const
virtual

Get compressor's internal status/error code and description for the last operation.

Implements ICompression.

Definition at line 79 of file compress.cpp.

References CCompression::m_ErrorCode.

Referenced by CLZOCompression::CompressBuffer(), CLZOCompression::CompressFile(), and CLZOCompression::DecompressFile().

◆ GetErrorCode() [2/2]

virtual int ICompression::GetErrorCode ( void  ) const
pure virtual

Implemented in CCompression.

◆ GetErrorDescription() [1/2]

string CCompression::GetErrorDescription ( void  ) const
virtual

◆ GetErrorDescription() [2/2]

virtual string ICompression::GetErrorDescription ( void  ) const
pure virtual

◆ GetFlags() [1/4]

virtual TFlags CArchive::GetFlags ( void  ) const
inlinevirtual

Get flags.

Definition at line 291 of file archive.hpp.

References CArchive::m_Flags.

◆ GetFlags() [2/4]

CCompression::TFlags CCompression::GetFlags ( void  ) const
virtual

◆ GetFlags() [3/4]

CTar::TFlags CTar::GetFlags ( void  ) const
inline

Get processing flags.

Definition at line 856 of file tar.hpp.

References CTar::m_Flags.

◆ GetFlags() [4/4]

virtual TFlags ICompression::GetFlags ( void  ) const
pure virtual

Implemented in CCompression.

◆ GetGroupId() [1/2]

unsigned int CArchiveEntryInfo::GetGroupId ( void  ) const
inline

Definition at line 154 of file archive_.hpp.

References CArchiveEntryInfo::m_Stat.

◆ GetGroupId() [2/2]

unsigned int CTarEntryInfo::GetGroupId ( void  ) const
inline

Definition at line 222 of file tar.hpp.

References CTarEntryInfo::m_Stat, and CDirEntry::SStat::orig.

Referenced by CTar::x_WriteEntryInfo().

◆ GetGroupName() [1/2]

const string& CArchiveEntryInfo::GetGroupName ( void  ) const
inline

Definition at line 139 of file archive_.hpp.

References CArchiveEntryInfo::m_GroupName.

Referenced by CArchive::x_Append().

◆ GetGroupName() [2/2]

const string& CTarEntryInfo::GetGroupName ( void  ) const
inline

Definition at line 192 of file tar.hpp.

References CTarEntryInfo::m_GroupName.

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

◆ GetIndex()

size_t CArchiveEntryInfo::GetIndex ( void  ) const
inline

Definition at line 141 of file archive_.hpp.

References CArchiveEntryInfo::m_Index.

◆ GetLastAccessCTime()

CTime CTarEntryInfo::GetLastAccessCTime ( void  ) const
inline

◆ GetLastAccessTime() [1/2]

time_t CArchiveEntryInfo::GetLastAccessTime ( void  ) const
inline

Definition at line 143 of file archive_.hpp.

References CArchiveEntryInfo::m_Stat.

◆ GetLastAccessTime() [2/2]

time_t CTarEntryInfo::GetLastAccessTime ( void  ) const
inline

Definition at line 199 of file tar.hpp.

References CTarEntryInfo::m_Stat, and CDirEntry::SStat::orig.

◆ GetLevel() [1/4]

virtual ELevel CBZip2Compression::GetLevel ( void  ) const
virtual

Get compression level.

Note
bzip2 doesn't support zero level compression, so eLevel_NoCompression will be translated to eLevel_Lowest.

Reimplemented from CCompression.

◆ GetLevel() [2/4]

CCompression::ELevel CCompression::GetLevel ( void  ) const
virtual

◆ GetLevel() [3/4]

CCompression::ELevel CLZOCompression::GetLevel ( void  ) const
virtual

Get compression level.

Note
This API use only two compression levels for LZO method. All compression levels will be translated only into 2 real values. We use LZO1X-999 compression for eLevel_Best, and LZO1X-1 for all other levels of compression.

Reimplemented from CCompression.

Definition at line 166 of file lzo.cpp.

References ICompression::eLevel_Lowest, ICompression::eLevel_NoCompression, and CCompression::GetLevel().

Referenced by CLZOCompression::CompressBuffer(), CLZOCompression::CompressFile(), CLZOCompression::DecompressFile(), CLZOCompressor::Init(), and CLZOCompressionFile::Open().

◆ GetLevel() [4/4]

virtual ELevel ICompression::GetLevel ( void  ) const
pure virtual

◆ GetLinkName() [1/2]

const string& CArchiveEntryInfo::GetLinkName ( void  ) const
inline

Definition at line 137 of file archive_.hpp.

References CArchiveEntryInfo::m_LinkName.

Referenced by CArchive::x_Append().

◆ GetLinkName() [2/2]

const string& CTarEntryInfo::GetLinkName ( void  ) const
inline

◆ GetLZOErrorDescription()

const char * CLZOCompression::GetLZOErrorDescription ( int  errcode)
protected

Get error description for specified error code.

Definition at line 801 of file lzo.cpp.

Referenced by CLZOCompression::CompressBlock(), CLZOCompression::CompressBuffer(), and CLZOCompression::DecompressBlock().

◆ GetMajor() [1/2]

unsigned int CArchiveEntryInfo::GetMajor ( void  ) const

◆ GetMajor() [2/2]

unsigned int CTarEntryInfo::GetMajor ( void  ) const

◆ GetMemoryLevel() [1/2]

int CZipCompression::GetMemoryLevel ( void  ) const
inline

Definition at line 457 of file zlib.hpp.

References CZipCompression::m_c_MemLevel.

◆ GetMemoryLevel() [2/2]

int CZipCloudflareCompression::GetMemoryLevel ( void  ) const
inline

Definition at line 451 of file zlib_cloudflare.hpp.

References CZipCloudflareCompression::m_c_MemLevel.

◆ GetMemoryLevelDefault() [1/2]

static int CZipCompression::GetMemoryLevelDefault ( void  )
static

◆ GetMemoryLevelDefault() [2/2]

static int CZipCloudflareCompression::GetMemoryLevelDefault ( void  )
static

◆ GetMemoryLevelMax() [1/2]

static int CZipCompression::GetMemoryLevelMax ( void  )
static

◆ GetMemoryLevelMax() [2/2]

static int CZipCloudflareCompression::GetMemoryLevelMax ( void  )
static

◆ GetMemoryLevelMin() [1/2]

static int CZipCompression::GetMemoryLevelMin ( void  )
static

◆ GetMemoryLevelMin() [2/2]

static int CZipCloudflareCompression::GetMemoryLevelMin ( void  )
static

◆ GetMinor() [1/2]

unsigned int CArchiveEntryInfo::GetMinor ( void  ) const

◆ GetMinor() [2/2]

unsigned int CTarEntryInfo::GetMinor ( void  ) const

◆ GetMode() [1/4]

void CArchiveEntryInfo::GetMode ( CDirEntry::TMode user_mode,
CDirEntry::TMode group_mode = 0,
CDirEntry::TMode other_mode = 0,
CDirEntry::TSpecialModeBits special_bits = 0 
) const

Definition at line 82 of file archive_.cpp.

References CArchiveEntryInfo::GetMode(), and CDirEntry::ModeFromModeT().

◆ GetMode() [2/4]

void CTarEntryInfo::GetMode ( CDirEntry::TMode user_mode,
CDirEntry::TMode group_mode = 0,
CDirEntry::TMode other_mode = 0,
CDirEntry::TSpecialModeBits special_bits = 0 
) const

Definition at line 470 of file tar.cpp.

References CTarEntryInfo::GetMode(), and s_TarToMode().

◆ GetMode() [3/4]

mode_t CArchiveEntryInfo::GetMode ( void  ) const

Definition at line 75 of file archive_.cpp.

References CArchiveEntryInfo::m_Stat.

Referenced by CArchiveEntryInfo::GetMode().

◆ GetMode() [4/4]

TTarMode CTarEntryInfo::GetMode ( void  ) const

◆ GetModificationCTime()

CTime CTarEntryInfo::GetModificationCTime ( void  ) const
inline

◆ GetModificationTime() [1/2]

time_t CArchiveEntryInfo::GetModificationTime ( void  ) const
inline

Definition at line 142 of file archive_.hpp.

References CArchiveEntryInfo::m_Stat.

Referenced by CArchive::x_Append(), and CArchive::x_ExtractEntry().

◆ GetModificationTime() [2/2]

time_t CTarEntryInfo::GetModificationTime ( void  ) const
inline

Definition at line 193 of file tar.hpp.

References CTarEntryInfo::m_Stat, and CDirEntry::SStat::orig.

Referenced by CTar::x_WriteEntryInfo().

◆ GetName() [1/2]

const string& CArchiveEntryInfo::GetName ( void  ) const
inline

Definition at line 136 of file archive_.hpp.

References CArchiveEntryInfo::m_Name.

Referenced by CArchive::x_ExtractEntry().

◆ GetName() [2/2]

const string& CTarEntryInfo::GetName ( void  ) const
inline

◆ GetNextEntryData()

IReader * CTar::GetNextEntryData ( void  )

Create and return an IReader, which can extract the current archive entry that has been previously returned via GetNextEntryInfo.

The returned pointer is non-zero only if the current entry is a file (even of size 0). The ownership of the pointer is passed to the caller (so it has to be explicitly deleted when no longer needed). The IReader may be used to read all or part of data out of the entry without affecting GetNextEntryInfo()'s ability to find any following entry in the archive. See test suite (in test/test_tar.cpp) for a usage example.

Returns
Pointer to IReader, or 0 if the current entry is not a file.
See also
GetNextEntryData, IReader, CRStream

Definition at line 4789 of file tar.cpp.

References CTar::CTarReader, CTarEntryInfo::eFile, CTarEntryInfo::eUnknown, CTar::fSkipUnsupported, CTarEntryInfo::GetType(), CTar::m_Current, and CTar::m_Flags.

◆ GetNextEntryInfo()

const CTarEntryInfo * CTar::GetNextEntryInfo ( void  )

Iterate over the archive forward and return first (or next) entry.

When using this method (possibly along with GetNextEntryData()), the archive stream (if any) must not be accessed outside the CTar API, because otherwise inconsistency in data may result. An application may call GetNextEntryData() to stream some or all of the data out of this entry, or it may call GetNextEntryInfo() again to skip to the next archive entry, etc. Note that the archive can contain multiple versions of the same entry (in case if an update was done on it), all of which but the last one are to be ignored. This call traverses through all those entry versions, and sequentially exposes them to the application level. See test suite (in test/test_tar.cpp) for a usage example.

Returns
Pointer to next entry info in the archive or 0 if EOF encountered.
See also
CTarEntryInfo, GetNextEntryData

Definition at line 1650 of file tar.cpp.

References _ASSERT, ALIGN_SIZE, BLOCK_OF, CTar::eInternal, CTarEntryInfo::ePos_Data, CTar::eRO, CTarEntryInfo::GetPosition(), CTarEntryInfo::GetSize(), CTar::m_Bad, CTar::m_Current, CTar::m_OpenMode, CTar::m_StreamPos, CTar::x_Open(), CTar::x_ReadAndProcess(), and CTar::x_Skip().

◆ GetNumEntries() [1/2]

size_t CArchiveZip::GetNumEntries ( void  )
virtual

Returns the total number of entries in the archive.

Implements IArchive.

Definition at line 270 of file archive_zip.cpp.

References _ASSERT, IArchive::eRead, IArchive::m_Mode, mz_zip_reader_get_num_files(), n, ZIP_CHECK, and ZIP_HANDLE.

◆ GetNumEntries() [2/2]

virtual size_t IArchive::GetNumEntries ( void  )
pure virtual

Returns the total number of entries in the archive.

Implemented in CArchiveZip.

◆ GetOutputSize()

size_t CCompressionProcessor::GetOutputSize ( void  )
inline

Definition at line 716 of file compress.hpp.

Referenced by CCompressionStream::x_GetOutputSize().

◆ GetPath()

const string& CTarEntryInfo::GetPath ( void  ) const
inline

Definition at line 228 of file tar.hpp.

References CTarEntryInfo::m_Path.

◆ GetPosition()

Uint8 CTarEntryInfo::GetPosition ( EPos  which) const
inline

◆ GetProcessedSize()

size_t CCompressionProcessor::GetProcessedSize ( void  )
inline

Definition at line 710 of file compress.hpp.

Referenced by CLZOCompressor::Finish(), and CCompressionStream::x_GetProcessedSize().

◆ GetRecommendedBufferSizes() [1/4]

static SRecommendedBufferSizes CBZip2Compression::GetRecommendedBufferSizes ( size_t  round_up = 0)
static

Get recommended buffer sizes for stream/file I/O.

These buffer sizes are softly recommended. They are not required, (de)compression streams accepts any reasonable buffer size, for both input and output. Respecting the recommended size just makes it a bit easier for (de)compressor, reducing the amount of memory shuffling and buffering, resulting in minor performance savings. If compression library doesn't have preferences about I/O buffer sizes, kCompressionDefaultBufSize will be used.

Parameters
round_upIf specified, round up a returned value by specified amount. Useful for better memory management. For example you can round up to virtual memory page size.
Returns
Structure with recommended buffer sizes.
Note
Applicable for streaming/file operations.
See also
kCompressionDefaultBufSize, CSystemInfo::GetVirtualMemoryPageSize()

◆ GetRecommendedBufferSizes() [2/4]

CCompression::SRecommendedBufferSizes CLZOCompression::GetRecommendedBufferSizes ( size_t  round_up = 0)
static

Get recommended buffer sizes for stream/file I/O.

These buffer sizes are softly recommended. They are not required, (de)compression streams accepts any reasonable buffer size, for both input and output. Respecting the recommended size just makes it a bit easier for (de)compressor, reducing the amount of memory shuffling and buffering, resulting in minor performance savings. If compression library doesn't have preferences about I/O buffer sizes, kCompressionDefaultBufSize will be used.

Parameters
round_up_byIf specified, round up a returned value by specified amount. Useful for better memory management. For example you can round up to virtual memory page size.
Returns
Structure with recommended buffer sizes.
Note
Applicable for streaming/file operations.
See also
kCompressionDefaultBufSize, CSystemInfo::GetVirtualMemoryPageSize()

Definition at line 719 of file lzo.cpp.

References CCompression::SRecommendedBufferSizes::compression_in, CCompression::SRecommendedBufferSizes::compression_out, CCompression::SRecommendedBufferSizes::decompression_in, CCompression::SRecommendedBufferSizes::decompression_out, kCompressionDefaultBufSize, and CCompression::SRecommendedBufferSizes::RoundUp().

◆ GetRecommendedBufferSizes() [3/4]

static SRecommendedBufferSizes CZipCompression::GetRecommendedBufferSizes ( size_t  round_up = 0)
static

Get recommended buffer sizes for stream/file I/O.

These buffer sizes are softly recommended. They are not required, (de)compression streams accepts any reasonable buffer size, for both input and output. Respecting the recommended size just makes it a bit easier for (de)compressor, reducing the amount of memory shuffling and buffering, resulting in minor performance savings. If compression library doesn't have preferences about I/O buffer sizes, kCompressionDefaultBufSize will be used.

Parameters
round_up_byIf specified, round up a returned value by specified amount. Useful for better memory management. For example you can round up to virtual memory page size.
Returns
Structure with recommended buffer sizes.
Note
Applicable for streaming/file operations.
See also
kCompressionDefaultBufSize, CSystemInfo::GetVirtualMemoryPageSize()

◆ GetRecommendedBufferSizes() [4/4]

static SRecommendedBufferSizes CZipCloudflareCompression::GetRecommendedBufferSizes ( size_t  round_up = 0)
static

Get recommended buffer sizes for stream/file I/O.

These buffer sizes are softly recommended. They are not required, (de)compression streams accepts any reasonable buffer size, for both input and output. Respecting the recommended size just makes it a bit easier for (de)compressor, reducing the amount of memory shuffling and buffering, resulting in minor performance savings. If compression library doesn't have preferences about I/O buffer sizes, kCompressionDefaultBufSize will be used.

Parameters
round_up_byIf specified, round up a returned value by specified amount. Useful for better memory management. For example you can round up to virtual memory page size.
Returns
Structure with recommended buffer sizes.
Note
Applicable for streaming/file operations.
See also
kCompressionDefaultBufSize, CSystemInfo::GetVirtualMemoryPageSize()

◆ GetSize() [1/3]

size_t CCompressionDictionary::GetSize ( void  )
inline

Return dictionary data size.

Definition at line 440 of file compress.hpp.

References CCompressionDictionary::m_Size.

◆ GetSize() [2/3]

Uint8 CArchiveEntryInfo::GetSize ( void  ) const
inline

Definition at line 145 of file archive_.hpp.

References CArchiveEntryInfo::m_Stat.

◆ GetSize() [3/3]

Uint8 CTarEntryInfo::GetSize ( void  ) const
inline

◆ GetSmallDecompress()

bool CBZip2Compression::GetSmallDecompress ( void  ) const
inline

Definition at line 287 of file bzip2.hpp.

References CBZip2Compression::m_d_SmallDecompress.

◆ GetSmallDecompressDefault()

static bool CBZip2Compression::GetSmallDecompressDefault ( void  )
static

◆ GetStrategy() [1/2]

int CZipCompression::GetStrategy ( void  ) const
inline

Definition at line 441 of file zlib.hpp.

References CZipCompression::m_c_Strategy.

◆ GetStrategy() [2/2]

int CZipCloudflareCompression::GetStrategy ( void  ) const
inline

Definition at line 435 of file zlib_cloudflare.hpp.

References CZipCloudflareCompression::m_c_Strategy.

◆ GetStrategyDefault() [1/2]

static int CZipCompression::GetStrategyDefault ( void  )
static

◆ GetStrategyDefault() [2/2]

static int CZipCloudflareCompression::GetStrategyDefault ( void  )
static

◆ GetStrategyMax() [1/2]

static int CZipCompression::GetStrategyMax ( void  )
static

◆ GetStrategyMax() [2/2]

static int CZipCloudflareCompression::GetStrategyMax ( void  )
static

◆ GetStrategyMin() [1/2]

static int CZipCompression::GetStrategyMin ( void  )
static

◆ GetStrategyMin() [2/2]

static int CZipCloudflareCompression::GetStrategyMin ( void  )
static

◆ GetStreamError() [1/3]

void CLZOCompressionFile::GetStreamError ( void  )
protected

Get error code/description of last stream operation (m_Stream).

It can be received using GetErrorCode()/GetErrorDescription() methods.

Definition at line 905 of file lzo.cpp.

References CCompressionStream::eRead, CCompressionIOStream::GetError(), CLZOCompressionFile::m_Stream, and CCompression::SetError().

Referenced by CLZOCompressionFile::Close(), CLZOCompressionFile::Read(), and CLZOCompressionFile::Write().

◆ GetStreamError() [2/3]

void CZipCompressionFile::GetStreamError ( void  )
protected

Get error code/description of last stream operation (m_Stream).

It can be received using GetErrorCode()/GetErrorDescription() methods.

◆ GetStreamError() [3/3]

void CZipCloudflareCompressionFile::GetStreamError ( void  )
protected

Get error code/description of last stream operation (m_Stream).

It can be received using GetErrorCode()/GetErrorDescription() methods.

◆ GetType() [1/2]

CDirEntry::EType CArchiveEntryInfo::GetType ( void  ) const
inline

◆ GetType() [2/2]

EType CTarEntryInfo::GetType ( void  ) const
inline

◆ GetUI2()

Uint2 CCompressionUtil::GetUI2 ( const void *  buf)
static

Read 2 bytes from buffer.

Definition at line 267 of file compress.cpp.

References buf, buffer, and NCBI_THROW.

Referenced by s_CheckLZOHeader().

◆ GetUI4()

Uint4 CCompressionUtil::GetUI4 ( const void *  buf)
static

◆ GetUserId() [1/2]

unsigned int CArchiveEntryInfo::GetUserId ( void  ) const
inline

Definition at line 153 of file archive_.hpp.

References CArchiveEntryInfo::m_Stat.

◆ GetUserId() [2/2]

unsigned int CTarEntryInfo::GetUserId ( void  ) const
inline

Definition at line 220 of file tar.hpp.

References CTarEntryInfo::m_Stat, and CDirEntry::SStat::orig.

Referenced by CTar::x_WriteEntryInfo().

◆ GetUserName() [1/2]

const string& CArchiveEntryInfo::GetUserName ( void  ) const
inline

Definition at line 138 of file archive_.hpp.

References CArchiveEntryInfo::m_UserName.

Referenced by CArchive::x_Append().

◆ GetUserName() [2/2]

const string& CTarEntryInfo::GetUserName ( void  ) const
inline

Definition at line 191 of file tar.hpp.

References CTarEntryInfo::m_UserName.

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

◆ GetVersion() [1/6]

virtual CVersionInfo CBZip2Compression::GetVersion ( void  ) const
virtual

Return name and version of the compression library.

Implements CCompression.

◆ GetVersion() [2/6]

CVersionInfo CLZOCompression::GetVersion ( void  ) const
virtual

Return name and version of the compression library.

Implements CCompression.

Definition at line 154 of file lzo.cpp.

◆ GetVersion() [3/6]

virtual CVersionInfo CZipCompression::GetVersion ( void  ) const
virtual

Return name and version of the compression library.

Implements CCompression.

◆ GetVersion() [4/6]

virtual CVersionInfo CZipCloudflareCompression::GetVersion ( void  ) const
virtual

Return name and version of the compression library.

Implements CCompression.

◆ GetVersion() [5/6]

virtual CVersionInfo ICompression::GetVersion ( void  ) const
pure virtual

Return name and version of the compression library.

Implemented in CCompression, CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.

◆ GetVersion() [6/6]

virtual CVersionInfo CCompression::GetVersion ( void  ) const
pure virtual

Return name and version of the compression library.

Implements ICompression.

Implemented in CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.

◆ GetWindowBits() [1/2]

int CZipCompression::GetWindowBits ( void  ) const
inline

Definition at line 478 of file zlib.hpp.

References CZipCompression::m_cd_WindowBits.

◆ GetWindowBits() [2/2]

int CZipCloudflareCompression::GetWindowBits ( void  ) const
inline

Definition at line 472 of file zlib_cloudflare.hpp.

References CZipCloudflareCompression::m_cd_WindowBits.

◆ GetWindowBitsDefault() [1/2]

static int CZipCompression::GetWindowBitsDefault ( void  )
static

◆ GetWindowBitsDefault() [2/2]

static int CZipCloudflareCompression::GetWindowBitsDefault ( void  )
static

◆ GetWindowBitsMax() [1/2]

static int CZipCompression::GetWindowBitsMax ( void  )
static

◆ GetWindowBitsMax() [2/2]

static int CZipCloudflareCompression::GetWindowBitsMax ( void  )
static

◆ GetWindowBitsMin() [1/2]

static int CZipCompression::GetWindowBitsMin ( void  )
static

◆ GetWindowBitsMin() [2/2]

static int CZipCloudflareCompression::GetWindowBitsMin ( void  )
static

◆ GetWorkFactor()

int CBZip2Compression::GetWorkFactor ( void  ) const
inline

Definition at line 274 of file bzip2.hpp.

References CBZip2Compression::m_c_WorkFactor.

◆ GetWorkFactorDefault()

static int CBZip2Compression::GetWorkFactorDefault ( void  )
static

◆ GetWorkFactorMax()

static int CBZip2Compression::GetWorkFactorMax ( void  )
static

◆ GetWorkFactorMin()

static int CBZip2Compression::GetWorkFactorMin ( void  )
static

◆ HaveSupport() [1/6]

virtual bool CBZip2Compression::HaveSupport ( ESupportFeature  feature)
virtual

Check if compression have support for a specified feature.

Implements ICompression.

◆ HaveSupport() [2/6]

bool CLZOCompression::HaveSupport ( ESupportFeature  feature)
virtual

Check if compression have support for a specified feature.

Implements ICompression.

Definition at line 196 of file lzo.cpp.

References ICompression::eFeature_Dictionary, ICompression::eFeature_EstimateCompressionBufferSize, and ICompression::eFeature_NoCompression.

◆ HaveSupport() [3/6]

virtual bool CZipCompression::HaveSupport ( ESupportFeature  feature)
virtual

Check if compression have support for a specified feature.

Implements ICompression.

◆ HaveSupport() [4/6]

virtual bool CZipCloudflareCompression::HaveSupport ( ESupportFeature  feature)
virtual

Check if compression have support for a specified feature.

Implements ICompression.

◆ HaveSupport() [5/6]

virtual bool ICompression::HaveSupport ( ESupportFeature  feature)
pure virtual

Check if compression have support for a specified feature.

Implemented in CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.

◆ HaveSupport() [6/6]

bool CArchive::HaveSupport ( ESupportFeature  feature,
int  param = 0 
)

Check that current archive format have support for specific features.

Parameters
featureName of the feature to check.
paramAdditional parameter (for eType only).
See also
ESupport

Definition at line 304 of file archive.cpp.

References ARCHIVE, ARCHIVE_CHECK, CArchive::eFeature_AbsolutePath, CArchive::eFeature_FileStream, and CArchive::eFeature_Type.

Referenced by CArchive::AppendFileFromMemory(), and CArchive::x_Append().

◆ HaveSupport_AbsolutePath() [1/2]

virtual bool CArchiveZip::HaveSupport_AbsolutePath ( void  )
inlinevirtual

Implements IArchive.

Definition at line 187 of file archive_zip.hpp.

◆ HaveSupport_AbsolutePath() [2/2]

virtual bool IArchive::HaveSupport_AbsolutePath ( void  )
pure virtual

Implemented in CArchiveZip.

◆ HaveSupport_FileStream() [1/2]

virtual bool CArchiveZip::HaveSupport_FileStream ( void  )
inlinevirtual

Implements IArchive.

Definition at line 188 of file archive_zip.hpp.

◆ HaveSupport_FileStream() [2/2]

virtual bool IArchive::HaveSupport_FileStream ( void  )
pure virtual

Implemented in CArchiveZip.

◆ HaveSupport_Type() [1/2]

bool CArchiveZip::HaveSupport_Type ( CDirEntry::EType  type)
virtual

Check that current archive format have support for specific feature.

See also
CArchive

Implements IArchive.

Definition at line 348 of file archive_zip.cpp.

References CDirEntry::eBlockSpecial, CDirEntry::eCharSpecial, CDirEntry::eDir, CDirEntry::eDoor, CDirEntry::eFile, CDirEntry::eLink, CDirEntry::ePipe, CDirEntry::eSocket, and CDirEntry::eUnknown.

◆ HaveSupport_Type() [2/2]

virtual bool IArchive::HaveSupport_Type ( CDirEntry::EType  type)
pure virtual

Check that current archive format have support for specific feature.

See also
CArchive

Implemented in CArchiveZip.

◆ IncreaseOutputSize()

void CCompressionProcessor::IncreaseOutputSize ( size_t  n_bytes)
inlineprotected

◆ IncreaseProcessedSize()

void CCompressionProcessor::IncreaseProcessedSize ( size_t  n_bytes)
inlineprotected

◆ Init() [1/9]

virtual EStatus CBZip2Compressor::Init ( void  )
protectedvirtual

Initialize the internal stream state for compression/decompression.

It does not perform any compression, this will be done by Process().

Implements CCompressionProcessor.

◆ Init() [2/9]

virtual EStatus CBZip2Decompressor::Init ( void  )
protectedvirtual

Initialize the internal stream state for compression/decompression.

It does not perform any compression, this will be done by Process().

Implements CCompressionProcessor.

◆ Init() [3/9]

CCompressionProcessor::EStatus CLZOCompressor::Init ( void  )
protectedvirtual

◆ Init() [4/9]

CCompressionProcessor::EStatus CLZODecompressor::Init ( void  )
protectedvirtual

Initialize the internal stream state for compression/decompression.

It does not perform any compression, this will be done by Process().

Implements CCompressionProcessor.

Definition at line 1357 of file lzo.cpp.

References CCompression::eMode_Unknown, CCompressionProcessor::eStatus_Success, kMaxHeaderSize, CLZODecompressor::m_Cache, CCompression::m_DecompressMode, CLZODecompressor::m_HeaderLen, CCompressionProcessor::Reset(), CCompressionProcessor::SetBusy(), and CCompression::SetError().

◆ Init() [5/9]

virtual EStatus CZipCompressor::Init ( void  )
protectedvirtual

Initialize the internal stream state for compression/decompression.

It does not perform any compression, this will be done by Process().

Implements CCompressionProcessor.

◆ Init() [6/9]

virtual EStatus CZipDecompressor::Init ( void  )
protectedvirtual

Initialize the internal stream state for compression/decompression.

It does not perform any compression, this will be done by Process().

Implements CCompressionProcessor.

◆ Init() [7/9]

virtual EStatus CZipCloudflareCompressor::Init ( void  )
protectedvirtual

Initialize the internal stream state for compression/decompression.

It does not perform any compression, this will be done by Process().

Implements CCompressionProcessor.

◆ Init() [8/9]

virtual EStatus CZipCloudflareDecompressor::Init ( void  )
protectedvirtual

Initialize the internal stream state for compression/decompression.

It does not perform any compression, this will be done by Process().

Implements CCompressionProcessor.

◆ Init() [9/9]

virtual EStatus CCompressionProcessor::Init ( void  )
protectedpure virtual

Initialize the internal stream state for compression/decompression.

It does not perform any compression, this will be done by Process().

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

Referenced by CCompressionStreamProcessor::Init().

◆ InitCompression()

void CLZOCompression::InitCompression ( ELevel  level)
protected

◆ Initialize() [1/4]

static bool CBZip2Compression::Initialize ( void  )
inlinestatic

Initialize compression library (for API compatibility, bz2 don't need it).

Definition at line 59 of file bzip2.hpp.

◆ Initialize() [2/4]

bool CLZOCompression::Initialize ( void  )
static

Initialize LZO library.

You should call this method only once, before any real compression/decompression operations.

  • Multi-Thread safety: If you are using this API in a multi-threaded application, and there is more than one thread using this API, it is safe to call Initialize() explicitly in the beginning of your main thread, before you run any other threads.

Definition at line 160 of file lzo.cpp.

◆ Initialize() [3/4]

static bool CZipCompression::Initialize ( void  )
inlinestatic

Initialize compression library (for API compatibility, zlib don't need it).

Definition at line 84 of file zlib.hpp.

◆ Initialize() [4/4]

static bool CZipCloudflareCompression::Initialize ( void  )
inlinestatic

Initialize compression library (for API compatibility, zlib don't need it).

Definition at line 78 of file zlib_cloudflare.hpp.

◆ IsBusy()

bool CCompressionProcessor::IsBusy ( void  ) const
inline

Return compressor's busy flag.

If returns value is true that the current compression object already have being use in other compression session.

Definition at line 682 of file compress.hpp.

Referenced by CCompressionStreamProcessor::IsOkay(), CLZOCompressor::~CLZOCompressor(), and CTransparentProcessor::~CTransparentProcessor().

◆ List() [1/2]

unique_ptr< CArchive::TEntries > CArchive::List ( void  )
virtual

Get information about archive entries.

Returns
An array containing information on those archive entries, whose names match the preset mask if any, or all entries otherwise.
See also
SetMask

Definition at line 326 of file archive.cpp.

References ARCHIVE_CHECK, CArchive::eList, CArchive::x_Open(), and CArchive::x_ReadAndProcess().

◆ List() [2/2]

unique_ptr< CTar::TEntries > CTar::List ( void  )
inline

Get information about all matching archive entries.

Returns
An array containing information on those archive entries, whose names match the pre-set mask.
See also
SetMask

Definition at line 842 of file tar.hpp.

References CTar::eList, CTar::x_Open(), and CTar::x_ReadAndProcess().

◆ Load()

void CArchiveMemory::Load ( const string filename)

Load existing archive from file system to memory.

Parameters
filenamePath to the existing archive.
Note
If you have opened or created archive, it will be automatically closed.
See also
Open, Save

Definition at line 1223 of file archive.cpp.

References ARCHIVE_THROW, CFileIO::Close(), CArchive::Close(), CFileIO_Base::eOpen, CFileIO_Base::eRead, f(), AutoArray< X, Del >::get(), CArchiveMemory::m_Buf, CArchiveMemory::m_BufSize, CArchiveMemory::m_OwnBuf, CFileIO::Open(), CFileIO::Read(), s_OSReason(), and tmp.

◆ LoadFromStream()

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

◆ NCBI_EXCEPTION_DEFAULT() [1/3]

CArchiveException::NCBI_EXCEPTION_DEFAULT ( CArchiveException  ,
CCoreException   
)

◆ NCBI_EXCEPTION_DEFAULT() [2/3]

CCompressionException::NCBI_EXCEPTION_DEFAULT ( CCompressionException  ,
CCoreException   
)

◆ NCBI_EXCEPTION_DEFAULT() [3/3]

CTarException::NCBI_EXCEPTION_DEFAULT ( CTarException  ,
CCoreException   
)

◆ OnChunk()

virtual EAction IChunkHandler::OnChunk ( TPosition  raw_pos,
TPosition  data_pos 
)
pure virtual

Callback method, to be implemented by the end user.

Parameters
raw_posPosition of the chunk in the "raw" (undecoded) stream.
data_posPosition of the chunk in the decoded stream data.
Returns
Return a command for the scanning algorithm to continue or stop scanning.

Implemented in CGZipChunkHandler.

◆ Open() [1/12]

bool CLZOCompressionFile::Open ( const string file_name,
EMode  mode,
SFileInfo info,
size_t  compression_in_bufsize = kCompressionDefaultBufSize,
size_t  compression_out_bufsize = kCompressionDefaultBufSize 
)
virtual

Opens a compressed file for reading or writing.

Do the same as standard Open(), but can also get/set file info.

Parameters
file_nameFile name of the file to open.
modeFile open mode.
infoPointer to file information structure. If not NULL, that it will be used to get information about compressed file in the read mode, and set it in the write mode for compressed files.
compression_in_bufsizeSize of the internal buffer holding input data to be (de)compressed.
compression_out_bufsizeSize of the internal buffer to receive data from a (de)compressor.
Returns
TRUE if file was opened successfully or FALSE otherwise.
See also
CLZOCompression, Read, Write, Close

Definition at line 928 of file lzo.cpp.

References buf, CLZOCompressionFile::Close(), CCompressionStreamProcessor::eDelete, CCompressionFile::eMode_Read, file_name, CCompressionStream::fOwnReader, CCompressionStream::fOwnWriter, CLZOCompression::GetBlockSize(), CCompression::GetFlags(), CLZOCompression::GetLevel(), in(), info, kMaxHeaderSize, CLZOCompression::m_BlockSize, CLZOCompressionFile::m_File, CLZOCompressionFile::m_Mode, CLZOCompressionFile::m_Stream, out(), s_CheckLZOHeader(), CLZOCompression::SetBlockSize(), CCompression::SetError(), CLZOCompressor::SetFileInfo(), string, and trunc.

◆ Open() [2/12]

virtual bool CZipCompressionFile::Open ( const string file_name,
EMode  mode,
SFileInfo info,
size_t  compression_in_bufsize = kCompressionDefaultBufSize,
size_t  compression_out_bufsize = kCompressionDefaultBufSize 
)
virtual

Opens a compressed file for reading or writing.

Do the same as standard Open(), but can also get/set file info.

Parameters
file_nameFile name of the file to open.
modeFile open mode.
infoPointer to file information structure. If it is not NULL, that it will be used to get information about compressed file in the read mode, and set it in the write mode for gzip files.
compression_in_bufsizeSize of the internal buffer holding input data to be (de)compressed.
compression_out_bufsizeSize of the internal buffer to receive data from a (de)compressor.
Returns
TRUE if file was opened successfully or FALSE otherwise.
See also
CZipCompression, Read, Write, Close

◆ Open() [3/12]

virtual bool CZipCloudflareCompressionFile::Open ( const string file_name,
EMode  mode,
SFileInfo info,
size_t  compression_in_bufsize = kCompressionDefaultBufSize,
size_t  compression_out_bufsize = kCompressionDefaultBufSize 
)
virtual

Opens a compressed file for reading or writing.

Do the same as standard Open(), but can also get/set file info.

Parameters
file_nameFile name of the file to open.
modeFile open mode.
infoPointer to file information structure. If it is not NULL, that it will be used to get information about compressed file in the read mode, and set it in the write mode for gzip files.
compression_in_bufsizeSize of the internal buffer holding input data to be (de)compressed.
compression_out_bufsizeSize of the internal buffer to receive data from a (de)compressor.
Returns
TRUE if file was opened successfully or FALSE otherwise.
See also
CZipCloudflareCompression, Read, Write, Close

◆ Open() [4/12]

virtual bool CBZip2CompressionFile::Open ( const string file_name,
EMode  mode,
size_t  compression_in_bufsize = kCompressionDefaultBufSize,
size_t  compression_out_bufsize = kCompressionDefaultBufSize 
)
virtual

Opens a compressed file for reading or writing.

Parameters
file_nameFile name of the file to open.
modeFile open mode.
Returns
TRUE if file was opened successfully or FALSE otherwise.
See also
CBZip2Compression, Read, Write, Close
Note
All advanced compression parameters or a dictionary should be set before Open() method, otherwise they will not have any effect.
Current implementation uses default bzip2 methods to work with compression files, so in/out buffer sizes are not used, and added for API uniformity only.

Implements CCompressionFile.

◆ Open() [5/12]

bool CLZOCompressionFile::Open ( const string file_name,
EMode  mode,
size_t  compression_in_bufsize = kCompressionDefaultBufSize,
size_t  compression_out_bufsize = kCompressionDefaultBufSize 
)
virtual

Opens a compressed file for reading or writing.

Parameters
file_nameFile name of the file to open.
modeFile open mode.
compression_in_bufsizeSize of the internal buffer holding input data to be (de)compressed.
compression_out_bufsizeSize of the internal buffer to receive data from a (de)compressor.
Returns
TRUE if file was opened successfully or FALSE otherwise.
See also
CLZOCompression, Read, Write, Close
Note
All advanced compression parameters or a dictionary should be set before Open() method, otherwise they will not have any effect.

Implements CCompressionFile.

Definition at line 914 of file lzo.cpp.

References CCompressionFile::eMode_Write, F_ISSET, file_name, CLZOCompression::fStoreFileInfo, info, and s_CollectFileInfo().

Referenced by CLZOCompressionFile::CLZOCompressionFile(), CLZOCompression::CompressFile(), and CLZOCompression::DecompressFile().

◆ Open() [6/12]

virtual bool CZipCompressionFile::Open ( const string file_name,
EMode  mode,
size_t  compression_in_bufsize = kCompressionDefaultBufSize,
size_t  compression_out_bufsize = kCompressionDefaultBufSize 
)
virtual

Opens a compressed file for reading or writing.

Parameters
file_nameFile name of the file to open.
modeFile open mode.
compression_in_bufsizeSize of the internal buffer holding input data to be (de)compressed.
compression_out_bufsizeSize of the internal buffer to receive data from a (de)compressor.
Returns
TRUE if file was opened successfully or FALSE otherwise.
See also
CZipCompression, Read, Write, Close
Note
All advanced compression parameters or a dictionary should be set before Open() method, otherwise they will not have any effect.

Implements CCompressionFile.

◆ Open() [7/12]

virtual bool CZipCloudflareCompressionFile::Open ( const string file_name,
EMode  mode,
size_t  compression_in_bufsize = kCompressionDefaultBufSize,
size_t  compression_out_bufsize = kCompressionDefaultBufSize 
)
virtual

Opens a compressed file for reading or writing.

Parameters
file_nameFile name of the file to open.
modeFile open mode.
compression_in_bufsizeSize of the internal buffer holding input data to be (de)compressed.
compression_out_bufsizeSize of the internal buffer to receive data from a (de)compressor.
Returns
TRUE if file was opened successfully or FALSE otherwise.
See also
CZipCloudflareCompression, Read, Write, Close
Note
All advanced compression parameters or a dictionary should be set before Open() method, otherwise they will not have any effect.

Implements CCompressionFile.

◆ Open() [8/12]

virtual bool CCompressionFile::Open ( const string path,
EMode  mode,
size_t  compression_in_bufsize = 0,
size_t  compression_out_bufsize = 0 
)
pure virtual

Opens a compressed file for reading or writing.

Return NULL if error has been occurred.

Implemented in CZipCloudflareCompressionFile, CZipCompressionFile, CLZOCompressionFile, and CBZip2CompressionFile.

◆ Open() [9/12]

void CArchiveFile::Open ( EAction  action)
protectedvirtual

Open the archive for specified action.

Implements CArchive.

Definition at line 1131 of file archive.cpp.

References ARCHIVE, ARCHIVE_CHECK, CArchive::eRO, int, and CArchiveFile::m_FileName.

◆ Open() [10/12]

void CArchiveMemory::Open ( EAction  action)
protectedvirtual

Open the archive for specified action.

Implements CArchive.

Definition at line 1181 of file archive.cpp.

References ARCHIVE, ARCHIVE_CHECK, CArchive::eRO, int, CArchiveMemory::m_Buf, CArchiveMemory::m_BufSize, and CArchiveMemory::m_InitialAllocationSize.

◆ Open() [11/12]

void CArchiveCompressionFileStream::Open ( EAction  action)
protectedvirtual

◆ Open() [12/12]

virtual void CArchive::Open ( EAction  action)
protectedpure virtual

Open archive.

Implemented in CArchiveCompressionFileStream, CArchiveMemory, and CArchiveFile.

Referenced by CArchive::x_Open().

◆ OpenFile() [1/2]

void CArchiveZip::OpenFile ( const string filename)
virtual

Open archive file for reading.

Parameters
filenameFile name of the existing archive to open.
See also
CreateFile, OpenMemory, ExtractEntryToFileSystem, ExtractEntryToMemory

Implements IArchive.

Definition at line 172 of file archive_zip.cpp.

References IArchive::eFile, IArchive::eRead, IArchive::m_Location, IArchive::m_Mode, mz_zip_reader_init_file(), ZIP_DELETE, ZIP_HANDLE, ZIP_NEW, and ZIP_THROW.

◆ OpenFile() [2/2]

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

Open archive file for reading.

Parameters
filenameFile name of the existing archive to open.
See also
CreateFile, OpenMemory, ExtractEntryToFileSystem, ExtractEntryToMemory

Implemented in CArchiveZip.

◆ OpenFileStream() [1/2]

void CArchiveZip::OpenFileStream ( FILE *  filestream,
Uint8  archive_size = 0 
)
virtual

Open archive from a FILE stream, beginning at the current file position.

Parameters
filestreamFile stream that can be used for archive operations.
archive_sizeThe archive is assumed to be 'archive_size' bytes long. If it is 0, then the entire rest of the file is assumed to contain the archive.
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
CreateFileStream, CreateFile, OpenFile, AddEntryFromFile, AddEntryFromMemory

Implements IArchive.

Definition at line 186 of file archive_zip.cpp.

References IArchive::eFileStream, IArchive::eRead, IArchive::m_Location, IArchive::m_Mode, mz_zip_reader_init_cfile(), ZIP_DELETE, ZIP_HANDLE, ZIP_NEW, and ZIP_THROW.

◆ OpenFileStream() [2/2]

virtual void IArchive::OpenFileStream ( FILE *  filestream,
Uint8  archive_size = 0 
)
pure virtual

Open archive from a FILE stream, beginning at the current file position.

Parameters
filestreamFile stream that can be used for archive operations.
archive_sizeThe archive is assumed to be 'archive_size' bytes long. If it is 0, then the entire rest of the file is assumed to contain the archive.
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
CreateFileStream, CreateFile, OpenFile, AddEntryFromFile, AddEntryFromMemory

Implemented in CArchiveZip.

◆ OpenMemory() [1/2]

void CArchiveZip::OpenMemory ( const void *  buf,
size_t  size 
)
virtual

Open archive located in memory for reading.

Parameters
bufPointer to an archive located in memory. Used only to open already existed archive for reading.
sizeSize of the archive.
See also
CreateMemory, OpenFile, ExtractEntryToFileSystem, ExtractEntryToMemory

Implements IArchive.

Definition at line 200 of file archive_zip.cpp.

References buf, IArchive::eMemory, IArchive::eRead, IArchive::m_Location, IArchive::m_Mode, mz_zip_reader_init_mem(), ncbi::grid::netcache::search::fields::size, ZIP_DELETE, ZIP_HANDLE, ZIP_NEW, and ZIP_THROW.

◆ OpenMemory() [2/2]

virtual void IArchive::OpenMemory ( const void *  buf,
size_t  size 
)
pure virtual

Open archive located in memory for reading.

Parameters
bufPointer to an archive located in memory. Used only to open already existed archive for reading.
sizeSize of the archive.
See also
CreateMemory, OpenFile, ExtractEntryToFileSystem, ExtractEntryToMemory

Implemented in CArchiveZip.

◆ operator<<() [1/2]

ostream& operator<< ( ostream &  os,
const CArchiveEntryInfo info 
)

◆ operator<<() [2/2]

ostream& operator<< ( ostream &  ,
const CTarEntryInfo  
)

Nice TOC(table of contents) printout.

◆ operator=() [1/17]

CArchive& CArchive::operator= ( const CArchive )
protected

◆ operator=() [2/17]

CArchiveCompressionFileStream& CArchiveCompressionFileStream::operator= ( const CArchiveCompressionFileStream )
private

◆ operator=() [3/17]

CArchiveFile& CArchiveFile::operator= ( const CArchiveFile )
private

◆ operator=() [4/17]

CArchiveMemory& CArchiveMemory::operator= ( const CArchiveMemory )
private

◆ operator=() [5/17]

CBZip2Compression& CBZip2Compression::operator= ( const CBZip2Compression )
private

Private assignment operator to prohibit assignment.

◆ operator=() [6/17]

CBZip2CompressionFile& CBZip2CompressionFile::operator= ( const CBZip2CompressionFile )
private

Private assignment operator to prohibit assignment.

◆ operator=() [7/17]

void CDynamicCharArray::operator= ( const CDynamicCharArray )
private

◆ operator=() [8/17]

CLZOBuffer& CLZOBuffer::operator= ( const CLZOBuffer )
private

Private assignment operator to prohibit assignment.

◆ operator=() [9/17]

CLZOCompression& CLZOCompression::operator= ( const CLZOCompression )
private

Private assignment operator to prohibit assignment.

◆ operator=() [10/17]

CLZOCompressionFile& CLZOCompressionFile::operator= ( const CLZOCompressionFile )
private

Private assignment operator to prohibit assignment.

◆ operator=() [11/17]

const CNlmZipBtRdr& CNlmZipBtRdr::operator= ( const CNlmZipBtRdr )
private

◆ operator=() [12/17]

const CNlmZipReader& CNlmZipReader::operator= ( const CNlmZipReader )
private

◆ operator=() [13/17]

CTar& CTar::operator= ( const CTar )
private

◆ operator=() [14/17]

CZipCloudflareCompression& CZipCloudflareCompression::operator= ( const CZipCloudflareCompression )
private

Private assignment operator to prohibit assignment.

◆ operator=() [15/17]

CZipCloudflareCompressionFile& CZipCloudflareCompressionFile::operator= ( const CZipCloudflareCompressionFile )
private

Private assignment operator to prohibit assignment.

◆ operator=() [16/17]

CZipCompression& CZipCompression::operator= ( const CZipCompression )
private

Private assignment operator to prohibit assignment.

◆ operator=() [17/17]

CZipCompressionFile& CZipCompressionFile::operator= ( const CZipCompressionFile )
private

Private assignment operator to prohibit assignment.

◆ operator==() [1/2]

bool CArchiveEntryInfo::operator== ( const CArchiveEntryInfo info) const

◆ operator==() [2/2]

bool CTarEntryInfo::operator== ( const CTarEntryInfo info) const
inline

◆ PendingCount()

ERW_Result CNlmZipReader::PendingCount ( size_t *  count)
virtual

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.

Return eRW_Success if the number of pending bytes has been stored at the location pointed to by "count". Return eRW_NotImplemented if the number cannot be determined. Otherwise, return other eRW_... condition to reflect the problem ("*count" does not need to be updated in the case of non-eRW_Success). Note that if reporting 0 bytes ready, the method may return either both eRW_Success and zero "*count", or return eRW_NotImplemented alone.

Implements IReader.

Definition at line 287 of file reader_zlib.cpp.

References eRW_Success, CNlmZipReader::m_BufferEnd, and CNlmZipReader::m_BufferPos.

◆ Process() [1/9]

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 
)
protectedvirtual

Compress/decompress as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full.

It may introduce some output latency (reading input without producing any output).

Implements CCompressionProcessor.

◆ Process() [2/9]

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 
)
protectedvirtual

Compress/decompress as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full.

It may introduce some output latency (reading input without producing any output).

Implements CCompressionProcessor.

◆ Process() [3/9]

CCompressionProcessor::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 
)
protectedvirtual

◆ Process() [4/9]

CCompressionProcessor::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 
)
protectedvirtual

◆ Process() [5/9]

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 
)
protectedvirtual

Compress/decompress as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full.

It may introduce some output latency (reading input without producing any output).

Implements CCompressionProcessor.

◆ Process() [6/9]

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 
)
protectedvirtual

Compress/decompress as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full.

It may introduce some output latency (reading input without producing any output).

Implements CCompressionProcessor.

◆ Process() [7/9]

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 
)
protectedvirtual

Compress/decompress as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full.

It may introduce some output latency (reading input without producing any output).

Implements CCompressionProcessor.

◆ Process() [8/9]

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 
)
protectedvirtual

Compress/decompress as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full.

It may introduce some output latency (reading input without producing any output).

Implements CCompressionProcessor.

◆ Process() [9/9]

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 
)
protectedpure virtual

Compress/decompress as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full.

It may introduce some output latency (reading input without producing any output).

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

Referenced by CCompressionStreambuf::ProcessStreamRead(), and CCompressionStreambuf::ProcessStreamWrite().

◆ Pushback()

bool CNlmZipBtRdr::Pushback ( const char *  data,
size_t  size 
)
virtual

◆ Read() [1/7]

size_t CNlmZipBtRdr::Read ( char *  buffer,
size_t  bufferLength 
)
virtual

◆ Read() [2/7]

ERW_Result CNlmZipReader::Read ( void *  buf,
size_t  count,
size_t *  bytes_read = 0 
)
virtual

Read as many as "count" bytes into a buffer pointed to by the "buf" argument.

Always store the number of bytes actually read (0 if read none) via the pointer "bytes_read", if provided non-NULL. Return non-eRW_Success code if EOF / error condition has been encountered during the operation (some data may have been read, nevertheless, and reflected in "*bytes_read"). Special case: if "count" is passed as 0, then the value of "buf" must be ignored, and no change should be made to the state of the input device (but may return non-eRW_Success to indicate that the input device has already been in an error condition).

Note
Apparently, may not return eRW_Success if hasn't been able to read "count" bytes as requested, and "bytes_read" was provided as NULL.
When returning "*bytes_read" as zero for a non-zero "count" requested, the return status should not indicate eRW_Success.
Warning
"*bytes_read" may never be returned greater than "count".
Attention
It is implementation-dependent whether the call blocks until the entire buffer is read or the call returns when at least some data are available. In general, it is advised that this call is made within a loop that checks for EOF condition and proceeds with the reading until the required amount of data has been retrieved.

Implements IReader.

Definition at line 294 of file reader_zlib.cpp.

References _ASSERT, CDynamicCharArray::Alloc(), CDynamicCharArray::At(), buffer, CNlmZipReader::eHeaderNone, eRW_Success, CNlmZipReader::kHeaderSize, CNlmZipReader::m_Buffer, CNlmZipReader::m_BufferEnd, CNlmZipReader::m_BufferPos, CNlmZipReader::m_Decompressor, CNlmZipReader::m_Header, CNlmZipReader::m_Reader, min(), IReader::Read(), result, CNlmZipReader::x_DecompressBuffer(), and CNlmZipReader::x_ReadZipHeader().

◆ Read() [3/7]

virtual long CBZip2CompressionFile::Read ( void *  buf,
size_t  len 
)
virtual

Read data from compressed file.

Read up to "len" uncompressed bytes from the compressed file "file" into the buffer "buf".

Parameters
bufBuffer for requested data.
lenNumber of bytes to read.
Returns
Number of bytes actually read (0 for end of file, -1 for error). The number of really read bytes can be less than requested.
See also
Open, Write, Close

Implements CCompressionFile.

◆ Read() [4/7]

long CLZOCompressionFile::Read ( void *  buf,
size_t  len 
)
virtual

Read data from compressed file.

Read up to "len" uncompressed bytes from the compressed file "file" into the buffer "buf".

Parameters
bufBuffer for requested data.
lenNumber of bytes to read.
Returns
Number of bytes actually read (0 for end of file, -1 for error). The number of really read bytes can be less than requested.
See also
Open, Write, Close

Implements CCompressionFile.

Definition at line 996 of file lzo.cpp.

References buf, CCompressionFile::eMode_Read, CCompressionStream::eRead, CCompressionProcessor::eStatus_Error, CCompressionIOStream::GetStatus(), CLZOCompressionFile::GetStreamError(), len, LIMIT_SIZE_PARAM_LONG, LIMIT_SIZE_PARAM_STREAMSIZE, CLZOCompressionFile::m_Mode, CLZOCompressionFile::m_Stream, and NCBI_THROW.

◆ Read() [5/7]

virtual long CZipCompressionFile::Read ( void *  buf,
size_t  len 
)
virtual

Read data from compressed file.

Read up to "len" uncompressed bytes from the compressed file "file" into the buffer "buf".

Parameters
bufBuffer for requested data.
lenNumber of bytes to read.
Returns
Number of bytes actually read (0 for end of file, -1 for error). The number of really read bytes can be less than requested.
See also
Open, Write, Close

Implements CCompressionFile.

◆ Read() [6/7]

virtual long CZipCloudflareCompressionFile::Read ( void *  buf,
size_t  len 
)
virtual

Read data from compressed file.

Read up to "len" uncompressed bytes from the compressed file "file" into the buffer "buf".

Parameters
bufBuffer for requested data.
lenNumber of bytes to read.
Returns
Number of bytes actually read (0 for end of file, -1 for error). The number of really read bytes can be less than requested.
See also
Open, Write, Close

Implements CCompressionFile.

◆ Read() [7/7]

virtual long CCompressionFile::Read ( void *  buf,
size_t  len 
)
pure virtual

Read up to "len" uncompressed bytes from the compressed file "file" into the buffer "buf".

Return the number of bytes actually read (0 for end of file, -1 for error)

Implemented in CZipCloudflareCompressionFile, CZipCompressionFile, CLZOCompressionFile, and CBZip2CompressionFile.

Referenced by CCompression::x_DecompressFile().

◆ Reset() [1/2]

void CArchiveEntryInfo::Reset ( void  )
inline

◆ Reset() [2/2]

void CCompressionProcessor::Reset ( void  )
inlineprotected

Reset internal state.

Definition at line 674 of file compress.hpp.

Referenced by CCompressionProcessor::CCompressionProcessor(), CLZOCompressor::Init(), and CLZODecompressor::Init().

◆ ResetBuffer()

void CLZOBuffer::ResetBuffer ( size_t  in_bufsize,
size_t  out_bufsize 
)
protected

◆ RoundUp()

size_t CCompression::SRecommendedBufferSizes::RoundUp ( size_t  value,
size_t  precision 
)
inline

Definition at line 665 of file compress.hpp.

References precision, and rapidjson::value.

Referenced by CLZOCompression::GetRecommendedBufferSizes().

◆ Save()

void CArchiveMemory::Save ( const string filename)

Save current opened/created archive to file.

Parameters
filenamePath to the archive file name. The directory in that archive file will be create should exists. If destination file already exists, it will be overwritten.
Note
Newly created archive should be finalized first.
See also
Create, Finalize, Load

Definition at line 1207 of file archive.cpp.

References ARCHIVE_CHECK, ARCHIVE_THROW, CFileIO::Close(), CFileIO_Base::eCreate, CFileIO_Base::eReadWrite, CArchiveMemory::m_Buf, CArchiveMemory::m_BufSize, NCBI_THROW, CFileIO::Open(), and CFileIO::Write().

◆ SetBaseDir() [1/2]

void CArchive::SetBaseDir ( const string dirname)
virtual

Set base directory to use for files while extracting from/adding to the archive, and in the latter case used only for relative paths.

See also
GetBaseDir

Definition at line 293 of file archive.cpp.

References CDirEntry::AddTrailingPathSeparator(), CArchive::m_BaseDir, and NStr::ReplaceInPlace().

◆ SetBaseDir() [2/2]

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.

See also
GetBaseDir

Definition at line 4603 of file tar.cpp.

References CTar::m_BaseDir, and s_BaseDir().

Referenced by CDownloadJob::x_DownloadAndExtract().

◆ SetBlockSize()

void CLZOCompression::SetBlockSize ( size_t  block_size)
inline

Block size.

LZO is a block compression algorithm - it compresses and decompresses blocks of data. Block size must be the same for compression and decompression. This parameter define a block size used for file/stream based compression/decompression to divide big data to chunks and compress them separately.

Block size set a memory budget for streaming (de)compression, with larger values of block size requiring more memory and typically better compression.

Methods operated with all data located in memory, like CompressBuffer() or DecompressBuffer() works by default with one big block, except 'fStreamFormat' flag has specified. Stream format stores used block size, so it is used automatically for decompression instead of provided value.

Definition at line 836 of file lzo.cpp.

References CLZOCompression::m_BlockSize, max(), and NCBI_THROW.

Referenced by CLZOCompression::CLZOCompression(), CLZOCompression::CompressFile(), CLZOCompression::DecompressFile(), and CLZOCompressionFile::Open().

◆ SetBusy()

void CCompressionProcessor::SetBusy ( bool  busy = true)
inlineprotected

◆ SetDictionary() [1/5]

virtual bool CBZip2Compression::SetDictionary ( CCompressionDictionary dict,
ENcbiOwnership  own = eNoOwnership 
)
virtual
Warning
No dictionary support for bzip2. Always return FALSE.
See also
HaveSupport

Implements ICompression.

◆ SetDictionary() [2/5]

bool CLZOCompression::SetDictionary ( CCompressionDictionary dict,
ENcbiOwnership  own = eNoOwnership 
)
virtual
Warning
No dictionary support for LZO. Always return FALSE.
See also
HaveSupport

Implements ICompression.

Definition at line 793 of file lzo.cpp.

References CCompression::SetError().

◆ SetDictionary() [3/5]

virtual bool CZipCompression::SetDictionary ( CCompressionDictionary dict,
ENcbiOwnership  own = eNoOwnership 
)
virtual

Set a dictionary for all compression/decompression operations.

Using dictionary can significantly reduce the size of the compressed data. Refer to the C++ documentation how to choose/prepare a dictionary.

Parameters
dictDictionary to use. New dictionary will be used for all subsequent compression/decompression buffer and file operations. NULL value invalidates previous dictionary, meaning "return to no-dictionary mode".
ownIf set to eTakeOwnership the dictionary will be owned by CCompression and automatically deleted when necessary.
Returns
Return TRUE on success, FALSE on error. FALSE usually mean that dictionaries are not supported for a current compression.
Note
Each compression algorithm have its own dictionary format and cannot be reused by some other compression algorithm.
Same dictionary should be used to compress and decompress data.
.gz files don't store a dictionary inside, so you will be unable to decompress files created using CompressFile() or streams with an active dictionary using any external utilities like 'gunzip'. But they will be still decompressible with DecompressFile() using the same dictionary.
If decompressed data have concatenated gzip files, and it is allowed to process them all, each gzip file should be compressed with the same dictionary. It is allowed to mix dictionary and non-dictionary compressed gzip files, the dictionary will be applied only when necessary.
See also
CompressBuffer, DecompressBuffer, CompressFile, DecompressFile

Implements ICompression.

◆ SetDictionary() [4/5]

virtual bool CZipCloudflareCompression::SetDictionary ( CCompressionDictionary dict,
ENcbiOwnership  own = eNoOwnership 
)
virtual

Set a dictionary for all compression/decompression operations.

Using dictionary can significantly reduce the size of the compressed data. Refer to the C++ documentation how to choose/prepare a dictionary.

Parameters
dictDictionary to use. New dictionary will be used for all subsequent compression/decompression buffer and file operations. NULL value invalidates previous dictionary, meaning "return to no-dictionary mode".
ownIf set to eTakeOwnership the dictionary will be owned by CCompression and automatically deleted when necessary.
Returns
Return TRUE on success, FALSE on error. FALSE usually mean that dictionaries are not supported for a current compression.
Note
Each compression algorithm have its own dictionary format and cannot be reused by some other compression algorithm.
Same dictionary should be used to compress and decompress data.
.gz files don't store a dictionary inside, so you will be unable to decompress files created using CompressFile() or streams with an active dictionary using any external utilities like 'gunzip'. But they will be still decompressible with DecompressFile() using the same dictionary.
If decompressed data have concatenated gzip files, and it is allowed to process them all, each gzip file should be compressed with the same dictionary. It is allowed to mix dictionary and non-dictionary compressed gzip files, the dictionary will be applied only when necessary.
See also
CompressBuffer, DecompressBuffer, CompressFile, DecompressFile

Implements ICompression.

◆ SetDictionary() [5/5]

virtual bool ICompression::SetDictionary ( CCompressionDictionary dict,
ENcbiOwnership  own = eNoOwnership 
)
pure virtual

Set a dictionary for all compression/decompression operations (if supported).

Implemented in CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.

◆ SetError() [1/2]

void CCompression::SetError ( int  status,
const char *  description = 0 
)
protected

◆ SetError() [2/2]

void CCompression::SetError ( int  status,
const string description 
)
protected

Definition at line 98 of file compress.cpp.

References CCompression::m_ErrorCode, and CCompression::m_ErrorMsg.

◆ SetFileInfo() [1/3]

void CLZOCompressor::SetFileInfo ( const SFileInfo info)

Set information about compressed file.

Definition at line 1127 of file lzo.cpp.

References info, and CLZOCompressor::m_FileInfo.

Referenced by CLZOCompressionFile::Open().

◆ SetFileInfo() [2/3]

void CZipCompressor::SetFileInfo ( const SFileInfo info)

Set information about compressed file.

Used for compression of gzip files.

◆ SetFileInfo() [3/3]

void CZipCloudflareCompressor::SetFileInfo ( const SFileInfo info)

Set information about compressed file.

Used for compression of gzip files.

◆ SetFlags() [1/4]

virtual void CArchive::SetFlags ( TFlags  flags)
inlinevirtual

Set flags.

Definition at line 293 of file archive.hpp.

References flags, and CArchive::m_Flags.

◆ SetFlags() [2/4]

void CCompression::SetFlags ( TFlags  flags)
virtual

◆ SetFlags() [3/4]

void CTar::SetFlags ( TFlags  flags)
inline

Set processing flags.

Definition at line 862 of file tar.hpp.

References flags, and CTar::m_Flags.

Referenced by CDownloadJob::x_DownloadAndExtract().

◆ SetFlags() [4/4]

virtual void ICompression::SetFlags ( TFlags  flags)
pure virtual

Implemented in CCompression.

◆ SetLevel() [1/2]

void CCompression::SetLevel ( ELevel  level)
virtual

Get/set compression level.

NOTE 1: Changing compression level after compression has begun will be ignored. NOTE 2: If the level is not supported by the underlying algorithm, then it will be translated to the nearest supported value.

Implements ICompression.

Definition at line 73 of file compress.cpp.

References CCompression::m_Level.

◆ SetLevel() [2/2]

virtual void ICompression::SetLevel ( ELevel  level)
pure virtual

Implemented in CCompression.

◆ SetMask() [1/2]

void CTar::SetMask ( CMask mask,
EOwnership  own = eNoOwnership,
EMaskType  type = eExtractMask,
NStr::ECase  acase = NStr::eCase 
)

Set name mask.

The set of masks is used to process existing entries in the archive: both the extract and exclude masks apply to the list and extract operations, and only the exclude mask apply to the named append. If masks are not defined then all archive entries will be processed.

Note
Unset mask means wildcard processing (all entries match).
Parameters
maskSet of masks (0 to unset the current set without setting a new one).
ownWhether to take ownership on the mask (delete upon CTar destruction).
See also

Definition at line 4586 of file tar.cpp.

References CTar::SMask::acase, eNoOwnership, int, NStr::IntToString(), CTar::m_Mask, CTar::SMask::mask, mask, CTar::SMask::owned, and TAR_THROW.

Referenced by CTar::~CTar().

◆ SetMask() [2/2]

void CArchive::SetMask ( CMask mask,
EOwnership  own = eNoOwnership,
EMaskType  type = eFullPathMask,
NStr::ECase  acase = NStr::eNocase 
)

Set name mask for processing.

The set of masks is used to process existing entries in the archive, and apply to list, extract and append operations. If masks are not defined then all archive entries will be processed. Each "mask" is a set of inclusion and exclusion patterns, each of them can be a wildcard file mask or regular expression.

Parameters
maskSet of masks (NULL unset the current set without setting a new one).
ownWhether to take ownership on the mask (delete upon CArchive destruction).
typeType of the mask. You can set two types of masks at the same time. The mask with type eFullPathMask applies to whole path name. The mask with type ePatternMask applies to each path component, to all subdirectories or file name, and if one of them matches, the entry will be processed. If masks for both types are set, the entry will be processed if it matches for each of them.
See also
UnsetMask, CMaskFileName, CMaskRegexp
Note
Unset mask means wildcard processing (all entries match).

Definition at line 258 of file archive.cpp.

References CArchive::SMask::acase, ARCHIVE_THROW, CArchive::eFullPathMask, eNoOwnership, CArchive::ePatternMask, NStr::IntToString(), CArchive::m_MaskFullPath, CArchive::m_MaskPattern, CArchive::SMask::mask, mask, NULL, and CArchive::SMask::owned.

Referenced by CArchive::UnsetMask().

◆ SetMemoryLevel() [1/2]

void CZipCompression::SetMemoryLevel ( int  mem_level)
inline

Memory level.

The "mem_level" parameter specifies how much memory should be allocated for the internal compression state. Low levels uses less memory but are slow and reduces compression ratio; maximum level uses maximum memory for optimal speed. See zconf.h for total memory usage as a function of windowBits and memLevel.

Definition at line 454 of file zlib.hpp.

References CZipCompression::GetMemoryLevelDefault(), kZlibDefaultMemLevel, and CZipCompression::m_c_MemLevel.

Referenced by Serialize< string, float >().

◆ SetMemoryLevel() [2/2]

void CZipCloudflareCompression::SetMemoryLevel ( int  mem_level)
inline

Memory level.

The "mem_level" parameter specifies how much memory should be allocated for the internal compression state. Low levels uses less memory but are slow and reduces compression ratio; maximum level uses maximum memory for optimal speed. See zconf.h for total memory usage as a function of windowBits and memLevel.

Definition at line 448 of file zlib_cloudflare.hpp.

References CZipCloudflareCompression::GetMemoryLevelDefault(), kZlibDefaultMemLevel, and CZipCloudflareCompression::m_c_MemLevel.

◆ SetSmallDecompress()

void CBZip2Compression::SetSmallDecompress ( bool  small_decompres)
inline

Small decompress.

If small decompress is set (TRUE), the library will use an alternative decompression algorithm which uses less memory but at the cost of decompressing more slowly (roughly speaking, half the speed, but the maximum memory requirement drops to around 2300k).

Definition at line 286 of file bzip2.hpp.

References CBZip2Compression::m_d_SmallDecompress.

◆ SetStrategy() [1/2]

void CZipCompression::SetStrategy ( int  strategy)
inline

Compression strategy.

The strategy parameter is used to tune the compression algorithm.

  • Z_DEFAULT_STRATEGY for normal data;
  • Z_HUFFMAN_ONLY to force Huffman encoding only (no string match);
  • Z_RLE run-length encoding (RLE) compression;
  • Z_FILTERED for data produced by a filter (or predictor); Filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better. The effect of Z_FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between Z_DEFAULT and Z_HUFFMAN_ONLY.
  • Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications;

The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. Used for compression only.

Definition at line 438 of file zlib.hpp.

References CZipCompression::GetStrategyDefault(), kZlibDefaultStrategy, and CZipCompression::m_c_Strategy.

◆ SetStrategy() [2/2]

void CZipCloudflareCompression::SetStrategy ( int  strategy)
inline

Compression strategy.

The strategy parameter is used to tune the compression algorithm.

  • Z_DEFAULT_STRATEGY for normal data;
  • Z_HUFFMAN_ONLY to force Huffman encoding only (no string match);
  • Z_RLE run-length encoding (RLE) compression;
  • Z_FILTERED for data produced by a filter (or predictor); Filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better. The effect of Z_FILTERED is to force more Huffman coding and less string matching; it is somewhat intermediate between Z_DEFAULT and Z_HUFFMAN_ONLY.
  • Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications;

The strategy parameter only affects the compression ratio but not the correctness of the compressed output even if it is not set appropriately. Used for compression only.

Definition at line 432 of file zlib_cloudflare.hpp.

References CZipCloudflareCompression::GetStrategyDefault(), kZlibDefaultStrategy, and CZipCloudflareCompression::m_c_Strategy.

◆ SetWindowBits() [1/2]

void CZipCompression::SetWindowBits ( int  window_bits)
inline

Window bits.

This parameter is the base two logarithm of the window size (the size of the history buffer). Larger values of this parameter result in better compression at the expense of memory usage. Used for compression and decompression. By default it is set to a maximum allowed values. Reducing windows bits from default can make to it unable to extract .gz files created by gzip.

Note
API support positive values for this parameters only. RAW deflate data is processed by default, for gzip format we have a apecial flags, see description for: fGZip, fCheckFileHeader, fWriteGZipFormat.

Definition at line 475 of file zlib.hpp.

References CZipCompression::GetWindowBitsDefault(), kZlibDefaultWbits, and CZipCompression::m_cd_WindowBits.

Referenced by Deserialize< string, float >(), and Serialize< string, float >().

◆ SetWindowBits() [2/2]

void CZipCloudflareCompression::SetWindowBits ( int  window_bits)
inline

Window bits.

This parameter is the base two logarithm of the window size (the size of the history buffer). Larger values of this parameter result in better compression at the expense of memory usage. Used for compression and decompression. By default it is set to a maximum allowed values. Reducing windows bits from default can make to it unable to extract .gz files created by gzip.

Note
API support positive values for this parameters only. RAW deflate data is processed by default, for gzip format we have a apecial flags, see description for: fGZip, fCheckFileHeader, fWriteGZipFormat.

Definition at line 469 of file zlib_cloudflare.hpp.

References CZipCloudflareCompression::GetWindowBitsDefault(), kZlibDefaultWbits, and CZipCloudflareCompression::m_cd_WindowBits.

◆ SetWorkFactor()

void CBZip2Compression::SetWorkFactor ( int  work_factor)
inline

Work factor.

This parameter controls how the compression phase behaves when presented with worst case, highly repetitive, input data. If compression runs into difficulties caused by repetitive data, the library switches from the standard sorting algorithm to a fallback algorithm. The fallback is slower than the standard algorithm by perhaps a factor of three, but always behaves reasonably, no matter how bad the input. Lower values of work_factor reduce the amount of effort the standard algorithm will expend before resorting to the fallback. You should set this parameter carefully; too low, and many inputs will be handled by the fallback algorithm and so compress rather slowly, too high, and your average-to-worst case compression times can become very large. The default value 30 gives reasonable behaviour over a wide range of circumstances. Allowable values range from 0 to 250 inclusive. 0 is a special case, equivalent to using the default value of 30.

Definition at line 273 of file bzip2.hpp.

References CBZip2Compression::m_c_WorkFactor.

◆ SFileInfo() [1/3]

CLZOCompression::SFileInfo::SFileInfo ( void  )
inline

Definition at line 363 of file lzo.hpp.

◆ SFileInfo() [2/3]

CZipCompression::SFileInfo::SFileInfo ( void  )
inline

Definition at line 359 of file zlib.hpp.

◆ SFileInfo() [3/3]

CZipCloudflareCompression::SFileInfo::SFileInfo ( void  )
inline

Definition at line 353 of file zlib_cloudflare.hpp.

◆ SkipEntry() [1/3]

virtual void CArchiveZip::SkipEntry ( const CArchiveEntryInfo )
inlinevirtual

Don't need to be implemented for ZIP format.

Implements IArchive.

Definition at line 238 of file archive_zip.hpp.

◆ SkipEntry() [2/3]

virtual void IArchive::SkipEntry ( const CArchiveEntryInfo info)
pure virtual

Don't need to be implemented for ZIP format.

Implemented in CArchiveZip.

◆ SkipEntry() [3/3]

void CArchive::SkipEntry ( void  )
protectedvirtual

Process current entry (List/Test/Extract/Append)

Definition at line 498 of file archive.cpp.

References ARCHIVE, and CArchive::m_Current.

Referenced by CArchive::x_ReadAndProcess().

◆ SMask() [1/2]

CArchive::SMask::SMask ( void  )
inline

Definition at line 411 of file archive.hpp.

◆ SMask() [2/2]

CTar::SMask::SMask ( void  )
inline

Definition at line 696 of file tar.hpp.

◆ StoreUI2()

void CCompressionUtil::StoreUI2 ( void *  buf,
unsigned long  value 
)
static

Store 2 bytes of value in the buffer.

Definition at line 252 of file compress.cpp.

References buf, buffer, kMax_UI2, NCBI_THROW, and rapidjson::value.

Referenced by s_WriteLZOHeader().

◆ StoreUI4()

void CCompressionUtil::StoreUI4 ( void *  buf,
unsigned long  value 
)
static

◆ Test() [1/2]

unique_ptr< CArchive::TEntries > CArchive::Test ( void  )
virtual

Verify archive integrity.

Read through the archive without actually extracting anything from it. Test all archive entries, whose names match the preset mask.

Returns
An array containing information on those archive entries, whose names match the preset mask if any, or all entries otherwise.
See also
SetMask

Definition at line 334 of file archive.cpp.

References ARCHIVE_CHECK, CArchive::eTest, CArchive::x_Open(), and CArchive::x_ReadAndProcess().

◆ Test() [2/2]

void CTar::Test ( void  )
inline

Verify archive integrity.

Read through the archive without actually extracting anything from it. Flag fDumpEntryHeaders causes most of archive headers to be dumped to the log (with eDiag_Info) as the Test() advances through the archive.

See also
SetFlags

Definition at line 849 of file tar.hpp.

References CTar::eTest, CTar::x_Open(), and CTar::x_ReadAndProcess().

◆ TestEntry() [1/3]

void CArchiveZip::TestEntry ( const CArchiveEntryInfo info)
virtual

Verify entry integrity.

Parameters
infoEntry to verify.

Implements IArchive.

Definition at line 478 of file archive_zip.cpp.

References _ASSERT, CDirEntry::eDir, IArchive::eRead, info, IArchive::m_Mode, mz_zip_reader_extract_to_callback(), s_ZipTestCallback(), NStr::SizetToString(), ZIP_CHECK, ZIP_HANDLE, and ZIP_THROW.

◆ TestEntry() [2/3]

virtual void IArchive::TestEntry ( const CArchiveEntryInfo info)
pure virtual

Verify entry integrity.

Parameters
infoEntry to verify.

Implemented in CArchiveZip.

◆ TestEntry() [3/3]

void CArchive::TestEntry ( void  )
protectedvirtual

◆ UnsetMask() [1/2]

void CArchive::UnsetMask ( EMaskType  type)

Unset name mask for processing.

See also
SetMask
Note
Unset mask means wildcard processing (all entries match).

Definition at line 280 of file archive.cpp.

References eNoOwnership, NULL, and CArchive::SetMask().

◆ UnsetMask() [2/2]

void CArchive::UnsetMask ( void  )

◆ Update()

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

Look whether more recent copies of the archive members are available in the file system, and if so, append them to the archive:

  • if fUpdate is set in processing flags, only the existing archive entries (including directories) will be updated; that is, Update(".") won't recursively add "." if "." is not an archive member; it will, however, do the recursive update should "." be found in the archive;
  • if fUpdate is unset, the existing entries will be updated (if their file system counterparts are newer), and nonexistent entries will be added to the archive; that is, Update(".") will recursively scan "." to update both existing entries (if newer files found), and also add new entries for any files/directories, which are currently not in.
Note
Updating stream archive may (and most certainly will) cause zero-filled gaps in the archive (can be read with "ignore zeroes").
Returns
A list of entries that have been updated.
See also
Append, SetBaseDir, SetMask, SetFlags

Definition at line 835 of file tar.hpp.

References CTar::eUpdate, CTar::x_Append(), CTar::x_Open(), and CTar::x_ReadAndProcess().

◆ Write() [1/5]

virtual long CBZip2CompressionFile::Write ( const void *  buf,
size_t  len 
)
virtual

Write data to compressed file.

Writes the given number of uncompressed bytes from the buffer into the compressed file.

Parameters
bufBuffer with written data.
lenNumber of bytes to write.
Returns
Number of bytes actually written or -1 for error.
See also
Open, Read, Close

Implements CCompressionFile.

◆ Write() [2/5]

long CLZOCompressionFile::Write ( const void *  buf,
size_t  len 
)
virtual

Write data to compressed file.

Writes the given number of uncompressed bytes from the buffer into the compressed file.

Parameters
bufBuffer with written data.
lenNumber of bytes to write.
Returns
Number of bytes actually written or -1 for error. Returned value can be less than "len".
See also
Open, Read, Close

Implements CCompressionFile.

Definition at line 1027 of file lzo.cpp.

References buf, CCompressionFile::eMode_Write, CLZOCompressionFile::GetStreamError(), len, LIMIT_SIZE_PARAM_LONG, LIMIT_SIZE_PARAM_STREAMSIZE, CLZOCompressionFile::m_Mode, CLZOCompressionFile::m_Stream, and NCBI_THROW.

◆ Write() [3/5]

virtual long CZipCompressionFile::Write ( const void *  buf,
size_t  len 
)
virtual

Write data to compressed file.

Writes the given number of uncompressed bytes from the buffer into the compressed file.

Parameters
bufBuffer with written data.
lenNumber of bytes to write.
Returns
Number of bytes actually written or -1 for error. Returned value can be less than "len".
See also
Open, Read, Close

Implements CCompressionFile.

◆ Write() [4/5]

virtual long CZipCloudflareCompressionFile::Write ( const void *  buf,
size_t  len 
)
virtual

Write data to compressed file.

Writes the given number of uncompressed bytes from the buffer into the compressed file.

Parameters
bufBuffer with written data.
lenNumber of bytes to write.
Returns
Number of bytes actually written or -1 for error. Returned value can be less than "len".
See also
Open, Read, Close

Implements CCompressionFile.

◆ Write() [5/5]

virtual long CCompressionFile::Write ( const void *  buf,
size_t  len 
)
pure virtual

Writes the given number of uncompressed bytes into the compressed file.

Return the number of bytes actually written or -1 for error. Returned value can be less than "len", especially if it exceed numeric_limits<long>::max(), you should repeat writing for remaining portion.

Implemented in CZipCloudflareCompressionFile, CZipCompressionFile, CLZOCompressionFile, and CBZip2CompressionFile.

Referenced by CCompression::x_CompressFile().

◆ x_Append() [1/3]

unique_ptr< CTar::TEntries > CTar::x_Append ( const CTarUserEntryInfo entry,
CNcbiIstream is 
)
private

◆ x_Append() [2/3]

unique_ptr< CTar::TEntries > CTar::x_Append ( const string name,
const TEntries toc = 0 
)
private

◆ x_Append() [3/3]

unique_ptr< CArchive::TEntries > CArchive::x_Append ( const string path,
ELevel  level,
const string comment,
const TEntries toc = NULL 
)
protected

Definition at line 895 of file archive.cpp.

References _ASSERT, _TROUBLE, CArchive::SMask::acase, ARCHIVE, ARCHIVE_THROW, CDirEntry::eBlockSpecial, CDirEntry::eCharSpecial, CDirEntry::eDir, CDirEntry::eDoor, CArchive::eFeature_AbsolutePath, CDirEntry::eFile, eFollowLinks, CTarEntryInfo::eHardLink, eIgnoreLinks, CDir::eIgnoreRecursive, CDirEntry::eLink, entries, CDirEntry::ePipe, CDirEntry::eSocket, CDirEntry::eUnknown, CArchive::eZip, F_ISSET, CArchive::fEqualTypes, CArchive::fFollowLinks, CArchive::fOverwrite, CArchive::fSkipUnsupported, NStr::fSplit_MergeDelimiters, CArchive::fUpdate, CDir::GetEntries(), CArchiveEntryInfo::GetGroupName(), CArchiveEntryInfo::GetLinkName(), CArchiveEntryInfo::GetModificationTime(), CDirEntry::GetOwner(), CDirEntry::GetType(), CArchiveEntryInfo::GetType(), CArchiveEntryInfo::GetUserName(), CArchive::HaveSupport(), ITERATE, kEmptyStr, CDirEntry::LookupLink(), CArchive::m_BaseDir, CArchiveEntryInfo::m_Comment, CArchive::m_Current, CArchive::m_Flags, CArchive::m_Format, CArchiveEntryInfo::m_GroupName, CArchiveEntryInfo::m_LinkName, CArchive::m_MaskFullPath, CArchive::m_MaskPattern, CArchive::m_Modified, CArchiveEntryInfo::m_Name, CArchiveEntryInfo::m_Stat, CArchiveEntryInfo::m_Type, CArchiveEntryInfo::m_UserName, CArchive::SMask::mask, CMask::Match(), match(), CDirEntry::SStat::orig, out(), REVERSE_ITERATE, s_ModeToTar(), s_OSReason(), s_ToArchiveName(), s_ToFilesystemPath(), NStr::Split(), CDirEntry::Stat(), type, NStr::UIntToString(), and CArchive::x_AppendEntry().

Referenced by CArchive::Append().

◆ x_AppendEntry()

bool CArchive::x_AppendEntry ( const string path,
ELevel  level = CCompression::eLevel_Default 
)
protected

◆ x_AppendFile()

bool CTar::x_AppendFile ( const string file)
private

◆ x_AppendStream()

void CTar::x_AppendStream ( const string name,
CNcbiIstream is 
)
private

◆ x_Backspace()

void CTar::x_Backspace ( EAction  action)
private

◆ x_Close()

void CTar::x_Close ( bool  truncate)
private

◆ x_CompressFile()

bool CCompression::x_CompressFile ( const string src_file,
CCompressionFile dst_file,
size_t  file_io_bufsize = kCompressionDefaultBufSize 
)
protectedvirtual

Universal file compression function.

Return TRUE on success, FALSE on error.

Definition at line 117 of file compress.cpp.

References buf, in(), kCompressionDefaultBufSize, kMax_Int, CCompression::SetError(), and CCompressionFile::Write().

Referenced by CLZOCompression::CompressFile().

◆ x_DecompressBuffer()

ERW_Result CNlmZipReader::x_DecompressBuffer ( void  )
protected

◆ x_DecompressFile()

bool CCompression::x_DecompressFile ( CCompressionFile src_file,
const string dst_file,
size_t  file_io_bufsize = kCompressionDefaultBufSize 
)
protectedvirtual

Universal file decompression function.

Return TRUE on success, FALSE on error.

Definition at line 147 of file compress.cpp.

References buf, kCompressionDefaultBufSize, kMax_Int, out(), CCompressionFile::Read(), and CCompression::SetError().

Referenced by CLZOCompression::DecompressFile().

◆ x_ExtractEntry() [1/2]

void CArchive::x_ExtractEntry ( const TEntries prev_entries)
protected

◆ x_ExtractEntry() [2/2]

bool CTar::x_ExtractEntry ( Uint8 size,
const CDirEntry dst,
const CDirEntry src 
)
private

◆ x_ExtractPlainFile()

void CTar::x_ExtractPlainFile ( Uint8 size,
const CDirEntry dst 
)
private

◆ x_ExtractSparseFile()

bool CTar::x_ExtractSparseFile ( Uint8 size,
const CDirEntry dst,
bool  dump = false 
)
private

◆ x_Flush()

bool CTar::x_Flush ( bool  nothrow = false)
private

◆ x_Init()

void CTar::x_Init ( void  )
private

◆ x_Open() [1/2]

void CArchive::x_Open ( EAction  action)
protected

◆ x_Open() [2/2]

void CTar::x_Open ( EAction  action)
private

◆ x_PackCurrentName()

bool CTar::x_PackCurrentName ( STarHeader header,
bool  link 
)
private

◆ x_ParsePAXData()

CTar::EStatus CTar::x_ParsePAXData ( const string data)
private

◆ x_ProcessEntry()

bool CTar::x_ProcessEntry ( EAction  action,
Uint8  size,
const TEntries done 
)
private

◆ x_Read()

ERW_Result CNlmZipReader::x_Read ( char *  buffer,
size_t  count,
size_t *  bytes_read 
)
protected

◆ x_ReadAndProcess() [1/2]

unique_ptr< CArchive::TEntries > CArchive::x_ReadAndProcess ( EAction  action)
protected

◆ x_ReadAndProcess() [2/2]

unique_ptr< CTar::TEntries > CTar::x_ReadAndProcess ( EAction  action)
private

Definition at line 2940 of file tar.cpp.

References _ASSERT, _TROUBLE, CTar::SMask::acase, CDirEntry::SStat::atime_nsec, BLOCK_SIZE, CTar::Checkpoint(), CDirEntry::SStat::ctime_nsec, done, CTar::eAppend, CTar::eContinue, CTar::eEOF, CTar::eExcludeMask, CTar::eExtract, CTar::eExtractMask, CTar::eFailure, CTarEntryInfo::eFile, CTarEntryInfo::eGNULongLink, CTarEntryInfo::eGNULongName, CTar::eInternal, CTar::eList, CTarEntryInfo::ePAXHeader, eRead, Error(), CTarEntryInfo::eSparseFile, CTar::eSuccess, CTar::eTest, CTar::eUndefined, CTarEntryInfo::eUnknown, CTar::eUpdate, CTar::eZeroBlock, false, CTar::fDumpEntryHeaders, CTar::fIgnoreZeroBlocks, fPAXAtime, fPAXCtime, fPAXGid, fPAXMtime, fPAXNone, fPAXSize, fPAXSparse, fPAXSparseGNU_1_0, fPAXUid, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, CTarEntryInfo::GetGroupName(), CTarEntryInfo::GetLinkName(), CTarEntryInfo::GetName(), CTarEntryInfo::GetSize(), CTarEntryInfo::GetType(), CTarEntryInfo::GetUserName(), if(), CTar::m_BufferSize, CTar::m_Current, CTar::m_FileName, CTar::m_Flags, CTarEntryInfo::m_GroupName, CTarEntryInfo::m_HeaderSize, CTarEntryInfo::m_LinkName, CTar::m_Mask, CTarEntryInfo::m_Name, CTarEntryInfo::m_Pos, CTarEntryInfo::m_Stat, CTar::m_StreamPos, CTarEntryInfo::m_Type, CTarEntryInfo::m_UserName, CTar::m_ZeroBlockCount, CTar::SMask::mask, mask, match(), CDirEntry::SStat::mtime_nsec, NCBI_THROW, OFFSET_OF, CDirEntry::SStat::orig, s_DumpZero(), s_MatchExcludeMask(), ncbi::grid::netcache::search::fields::size, SIZE_OF, NStr::Split(), TAR_POST, TAR_THROW, Warning(), CTar::x_Backspace(), CTar::x_ProcessEntry(), and CTar::x_ReadEntryInfo().

Referenced by CTar::Extract(), CTar::GetNextEntryInfo(), CTar::List(), CTar::Test(), CTar::Update(), and CTar::x_Open().

◆ x_ReadArchive()

const char * CTar::x_ReadArchive ( size_t &  n)
private

◆ x_ReadEntryInfo()

CTar::EStatus CTar::x_ReadEntryInfo ( bool  dump,
bool  pax 
)
private

Definition at line 2138 of file tar.cpp.

References _ASSERT, _TROUBLE, ALIGN_SIZE, BLOCK_SIZE, TTarBlock::buffer, STarHeader::checksum, CDirEntry::ConcatPath(), Critical(), data, STarHeader::devmajor, STarHeader::devminor, dump, CTarEntryInfo::eBlockDev, CTarEntryInfo::eCharDev, CTar::eContinue, eDiag_Info, CTarEntryInfo::eDir, CTar::eEOF, CTar::eFailure, CTarEntryInfo::eFile, CTarEntryInfo::eGNULongLink, CTarEntryInfo::eGNULongName, CTarEntryInfo::eHardLink, CTarEntryInfo::ePAXHeader, CTarEntryInfo::ePipe, eRead, ERR_POST, ERR_POST_ONCE, Error(), CTarEntryInfo::eSparseFile, CTar::eSuccess, CTarEntryInfo::eSymLink, eTar_Legacy, eTar_OldGNU, eTar_Posix, eTar_Star, eTar_Unknown, eTar_Ustar, CTarEntryInfo::eUnknown, CTarEntryInfo::eVolHeader, CTar::eZeroBlock, CTar::fDumpEntryHeaders, NStr::fNewLine_Passthru, NStr::fNewLine_Quote, CTarEntryInfo::GetName(), CTarEntryInfo::GetSize(), CTarEntryInfo::GetType(), STarHeader::gid, STarHeader::gname, STarHeader::gnu, TTarBlock::header, i, Info(), int, kEmptyStr, STarHeader::linkname, CTar::m_BufferSize, CTar::m_Current, CTar::m_FileName, CTar::m_Flags, CTarEntryInfo::m_GroupName, CTarEntryInfo::m_HeaderSize, CTarEntryInfo::m_LinkName, CTarEntryInfo::m_Name, CTarEntryInfo::m_Pos, CTarEntryInfo::m_Stat, CTar::m_StreamPos, CTarEntryInfo::m_Type, CTarEntryInfo::m_UserName, STarHeader::magic, memcchr(), STarHeader::mode, STarHeader::mtime, STarHeader::name, NStr::NumericToString(), CDirEntry::SStat::orig, STarHeader::prefix, prefix, NStr::PrintableString(), s_DecodeUint8(), s_Dump(), s_DumpSparse(), s_IsOctal(), s_Length(), s_OctalToNum(), s_PositionAsString(), SetDiagPostLevel(), STarHeader::size, STarHeader::star, util::strcmp(), TAR_POST, TAR_THROW, TAR_THROW_EX, toupper(), Trace(), STarHeader::typeflag, STarHeader::uid, STarHeader::uname, val, Warning(), CTar::x_ParsePAXData(), and CTar::x_ReadArchive().

Referenced by CTar::x_ReadAndProcess().

◆ x_ReadLine()

string CTar::x_ReadLine ( Uint8 size,
const char *&  data,
size_t &  nread 
)
private

◆ x_ReadZipHeader()

size_t CNlmZipReader::x_ReadZipHeader ( char *  buffer)
protected

◆ x_RestoreAttrs() [1/2]

void CArchive::x_RestoreAttrs ( const CArchiveEntryInfo info,
const CDirEntry dst = NULL 
) const
protected

◆ x_RestoreAttrs() [2/2]

void CTar::x_RestoreAttrs ( const CTarEntryInfo info,
TFlags  what,
const CDirEntry path = 0,
TTarMode  perm = 0 
) const
private

◆ x_Skip()

void CTar::x_Skip ( Uint8  blocks)
private

◆ x_StartDecompressor()

void CNlmZipReader::x_StartDecompressor ( void  )
protected

◆ x_StartPlain()

void CNlmZipReader::x_StartPlain ( void  )
protected

◆ x_WriteArchive()

void CTar::x_WriteArchive ( size_t  n,
const char *  buffer = 0 
)
private

◆ x_WriteEntryInfo()

void CTar::x_WriteEntryInfo ( const string name)
private

◆ ~CArchive()

CArchive::~CArchive ( void  )
virtual

Destructor.

Close the archive if currently open.

See also
Close

Definition at line 231 of file archive.cpp.

References ARCHIVE, CArchive::Close(), COMPRESS_HANDLE_EXCEPTIONS, CArchive::m_Archive, and CArchive::UnsetMask().

◆ ~CArchiveCompressionFileStream()

CArchiveCompressionFileStream::~CArchiveCompressionFileStream ( void  )
virtual

Destructor.

Close the archive if currently open.

See also
Close

Definition at line 1282 of file archive.cpp.

References CArchiveCompressionFileStream::m_fd, and CArchiveCompressionFileStream::m_FileStream.

◆ ~CArchiveZip()

CArchiveZip::~CArchiveZip ( void  )
virtual

Destructor.

Definition at line 118 of file archive_zip.cpp.

References CArchiveZip::Close(), COMPRESS_HANDLE_EXCEPTIONS, and CArchiveZip::m_Handle.

◆ ~CBZip2Compression()

virtual CBZip2Compression::~CBZip2Compression ( void  )
virtual

Destructor.

◆ ~CBZip2CompressionFile()

CBZip2CompressionFile::~CBZip2CompressionFile ( void  )

Destructor.

◆ ~CBZip2Compressor()

virtual CBZip2Compressor::~CBZip2Compressor ( void  )
virtual

Destructor.

◆ ~CBZip2Decompressor()

virtual CBZip2Decompressor::~CBZip2Decompressor ( void  )
virtual

Destructor.

◆ ~CCompression()

CCompression::~CCompression ( void  )
virtual

Definition at line 55 of file compress.cpp.

References eTakeOwnership, CCompression::m_Dict, and CCompression::m_DictOwn.

◆ ~CCompressionDictionary()

CCompressionDictionary::~CCompressionDictionary ( void  )
virtual

Destructor.

Definition at line 335 of file compress.cpp.

References CCompressionDictionary::Free().

◆ ~CCompressionFile()

CCompressionFile::~CCompressionFile ( void  )
virtual

Definition at line 210 of file compress.cpp.

◆ ~CCompressionProcessor()

CCompressionProcessor::~CCompressionProcessor ( void  )
virtual

Definition at line 192 of file compress.cpp.

◆ ~CDynamicCharArray()

CDynamicCharArray::~CDynamicCharArray ( void  )

Definition at line 52 of file reader_zlib.cpp.

References CDynamicCharArray::m_Array.

◆ ~CLZOCompression()

CLZOCompression::~CLZOCompression ( void  )
virtual

Destructor.

Definition at line 148 of file lzo.cpp.

◆ ~CLZOCompressionFile()

CLZOCompressionFile::~CLZOCompressionFile ( void  )

Destructor.

Definition at line 895 of file lzo.cpp.

References CLZOCompressionFile::Close(), and COMPRESS_HANDLE_EXCEPTIONS.

◆ ~CLZOCompressor()

CLZOCompressor::~CLZOCompressor ( void  )
virtual

Destructor.

Definition at line 1118 of file lzo.cpp.

References CLZOCompressor::End(), and CCompressionProcessor::IsBusy().

◆ ~CLZODecompressor()

CLZODecompressor::~CLZODecompressor ( void  )
virtual

Destructor.

Definition at line 1352 of file lzo.cpp.

◆ ~CNlmZipBtRdr()

CNlmZipBtRdr::~CNlmZipBtRdr ( )

Definition at line 207 of file reader_zlib.cpp.

◆ ~CNlmZipReader()

CNlmZipReader::~CNlmZipReader ( void  )

◆ ~CTar()

CTar::~CTar ( )
virtual

Destructor (finalize the archive if currently open).

See also
Close

Definition at line 1346 of file tar.cpp.

References eNoOwnership, i, CTar::m_BufPtr, CTar::m_FileStream, CTar::m_Mask, CTar::SetMask(), CTar::x_Close(), and CTar::x_Flush().

◆ ~CZipCloudflareCompression()

virtual CZipCloudflareCompression::~CZipCloudflareCompression ( void  )
virtual

Destructor.

◆ ~CZipCloudflareCompressionFile()

CZipCloudflareCompressionFile::~CZipCloudflareCompressionFile ( void  )

Destructor.

◆ ~CZipCloudflareCompressor()

virtual CZipCloudflareCompressor::~CZipCloudflareCompressor ( void  )
virtual

Destructor.

◆ ~CZipCloudflareDecompressor()

virtual CZipCloudflareDecompressor::~CZipCloudflareDecompressor ( void  )
virtual

Destructor.

◆ ~CZipCompression()

virtual CZipCompression::~CZipCompression ( void  )
virtual

Destructor.

◆ ~CZipCompressionFile()

CZipCompressionFile::~CZipCompressionFile ( void  )

Destructor.

◆ ~CZipCompressor()

virtual CZipCompressor::~CZipCompressor ( void  )
virtual

Destructor.

◆ ~CZipDecompressor()

virtual CZipDecompressor::~CZipDecompressor ( void  )
virtual

Destructor.

◆ ~IArchive()

virtual IArchive::~IArchive ( void  )
inlinevirtual

Definition at line 220 of file archive_.hpp.

◆ ~IChunkHandler()

virtual IChunkHandler::~IChunkHandler ( void  )
inlinevirtual

Destructor.

Definition at line 642 of file compress.hpp.

◆ ~ICompression()

virtual ICompression::~ICompression ( void  )
inlinevirtual

Destructor.

Definition at line 164 of file compress.hpp.

Variable Documentation

◆ acase [1/2]

NStr::ECase CArchive::SMask::acase

Definition at line 409 of file archive.hpp.

Referenced by CArchive::SetMask(), CArchive::x_Append(), and CArchive::x_ReadAndProcess().

◆ acase [2/2]

NStr::ECase CTar::SMask::acase

Definition at line 693 of file tar.hpp.

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

◆ comment [1/3]

string CLZOCompression::SFileInfo::comment

Definition at line 361 of file lzo.hpp.

◆ comment [2/3]

string CZipCompression::SFileInfo::comment

Definition at line 357 of file zlib.hpp.

◆ comment [3/3]

string CZipCloudflareCompression::SFileInfo::comment

Definition at line 351 of file zlib_cloudflare.hpp.

◆ compression_in

size_t CCompression::SRecommendedBufferSizes::compression_in

compression: recommended size for input buffer

Definition at line 300 of file compress.hpp.

Referenced by CLZOCompression::GetRecommendedBufferSizes().

◆ compression_out

size_t CCompression::SRecommendedBufferSizes::compression_out

compression: recommended size for output buffer

Definition at line 301 of file compress.hpp.

Referenced by CLZOCompression::GetRecommendedBufferSizes().

◆ decompression_in

size_t CCompression::SRecommendedBufferSizes::decompression_in

decompression: recommended size for input buffer

Definition at line 302 of file compress.hpp.

Referenced by CLZOCompression::GetRecommendedBufferSizes().

◆ decompression_out

size_t CCompression::SRecommendedBufferSizes::decompression_out

decompression: recommended size for output buffer

Definition at line 303 of file compress.hpp.

Referenced by CLZOCompression::GetRecommendedBufferSizes().

◆ kCompressionDefaultBufSize

const streamsize kCompressionDefaultBufSize = 16*1024

Default compression I/O stream buffer size.

Definition at line 111 of file compress.hpp.

Referenced by CLZOCompression::GetRecommendedBufferSizes(), CCompression::x_CompressFile(), and CCompression::x_DecompressFile().

◆ kLZODefaultBlockSize

const size_t kLZODefaultBlockSize = 24*1024

Default LZO block size.

Deprecated:
Please use CLZOCompression::GetBlockSizeDefault() instead

Definition at line 103 of file lzo.hpp.

◆ kZlibDefaultCompression

const int kZlibDefaultCompression = -1

Definition at line 70 of file zlib.hpp.

◆ kZlibDefaultMemLevel

const int kZlibDefaultMemLevel = -1

◆ kZlibDefaultStrategy

const int kZlibDefaultStrategy = -1

◆ kZlibDefaultWbits

const int kZlibDefaultWbits = -1

◆ m_Archive

unique_ptr<IArchive> CArchive::m_Archive
protected

Pointer to interface to EFormat-specific archive support.

Definition at line 477 of file archive.hpp.

Referenced by CArchive::CArchive(), and CArchive::~CArchive().

◆ m_Array

char* CDynamicCharArray::m_Array
private

◆ m_Bad

bool CTar::m_Bad
private

True if a fatal output error occurred.

Definition at line 788 of file tar.hpp.

Referenced by CTar::GetNextEntryInfo(), CTar::x_Close(), CTar::x_Flush(), CTar::x_Open(), and CTar::x_WriteArchive().

◆ m_BaseDir [1/2]

string CArchive::m_BaseDir
protected

Base directory for relative paths.

Definition at line 481 of file archive.hpp.

Referenced by CArchive::GetBaseDir(), CArchive::SetBaseDir(), CArchive::x_Append(), CArchive::x_ExtractEntry(), and CArchive::x_RestoreAttrs().

◆ m_BaseDir [2/2]

string CTar::m_BaseDir
private

Base directory for relative paths.

Definition at line 790 of file tar.hpp.

Referenced by CTar::GetBaseDir(), CTar::SetBaseDir(), CTar::x_Append(), CTar::x_ExtractEntry(), and CTar::x_ProcessEntry().

◆ m_BlockLen

size_t CLZODecompressor::m_BlockLen
private

Length of the compressed data in the block.

Definition at line 749 of file lzo.hpp.

Referenced by CLZODecompressor::DecompressCache(), CLZODecompressor::Finish(), and CLZODecompressor::Process().

◆ m_BlockSize

size_t CLZOCompression::m_BlockSize
protected

◆ m_Buf [1/2]

const void* CArchiveMemory::m_Buf
protected

◆ m_Buf [2/2]

AutoArray<char> CLZOBuffer::m_Buf
private

Buffer for caching (size of m_Size*2).

Definition at line 633 of file lzo.hpp.

Referenced by CLZOBuffer::ResetBuffer().

◆ m_Buffer [1/2]

CDynamicCharArray CNlmZipReader::m_Buffer
private

Definition at line 151 of file reader_zlib.hpp.

Referenced by CNlmZipReader::Read(), and CNlmZipReader::x_DecompressBuffer().

◆ m_Buffer [2/2]

char* CTar::m_Buffer
private

◆ m_BufferEnd

size_t CNlmZipReader::m_BufferEnd
private

◆ m_BufferPos [1/2]

size_t CNlmZipReader::m_BufferPos
private

◆ m_BufferPos [2/2]

size_t CTar::m_BufferPos
private

◆ m_BufferSize

const size_t CTar::m_BufferSize
private

◆ m_BufPtr

char* CTar::m_BufPtr
private

Page-unaligned buffer pointer.

Definition at line 783 of file tar.hpp.

Referenced by CTar::x_Init(), and CTar::~CTar().

◆ m_BufSize

size_t CArchiveMemory::m_BufSize
protected

◆ m_Busy

bool CCompressionProcessor::m_Busy
private

Definition at line 565 of file compress.hpp.

◆ m_c_MemLevel [1/2]

int CZipCompression::m_c_MemLevel
protected

The allocation memory level for the compression.

Definition at line 491 of file zlib.hpp.

Referenced by CZipCompression::GetMemoryLevel(), and CZipCompression::SetMemoryLevel().

◆ m_c_MemLevel [2/2]

int CZipCloudflareCompression::m_c_MemLevel
protected

The allocation memory level for the compression.

Definition at line 485 of file zlib_cloudflare.hpp.

Referenced by CZipCloudflareCompression::GetMemoryLevel(), and CZipCloudflareCompression::SetMemoryLevel().

◆ m_c_Strategy [1/2]

int CZipCompression::m_c_Strategy
protected

The parameter to tune up a compression algorithm.

Definition at line 492 of file zlib.hpp.

Referenced by CZipCompression::GetStrategy(), and CZipCompression::SetStrategy().

◆ m_c_Strategy [2/2]

int CZipCloudflareCompression::m_c_Strategy
protected

The parameter to tune up a compression algorithm.

Definition at line 486 of file zlib_cloudflare.hpp.

Referenced by CZipCloudflareCompression::GetStrategy(), and CZipCloudflareCompression::SetStrategy().

◆ m_c_WorkFactor

int CBZip2Compression::m_c_WorkFactor
protected

See description above.

Definition at line 299 of file bzip2.hpp.

Referenced by CBZip2Compression::GetWorkFactor(), and CBZip2Compression::SetWorkFactor().

◆ m_Cache [1/5]

string CLZODecompressor::m_Cache
private

Buffer to cache header.

Definition at line 750 of file lzo.hpp.

Referenced by CLZODecompressor::Finish(), CLZODecompressor::Init(), and CLZODecompressor::Process().

◆ m_Cache [2/5]

string CZipCompressor::m_Cache
private

Buffer to cache small pieces of data.

Definition at line 695 of file zlib.hpp.

◆ m_Cache [3/5]

string CZipDecompressor::m_Cache
private

Buffer to cache small pieces of data.

Definition at line 744 of file zlib.hpp.

◆ m_Cache [4/5]

string CZipCloudflareCompressor::m_Cache
private

Buffer to cache small pieces of data.

Definition at line 689 of file zlib_cloudflare.hpp.

◆ m_Cache [5/5]

string CZipCloudflareDecompressor::m_Cache
private

Buffer to cache small pieces of data.

Definition at line 738 of file zlib_cloudflare.hpp.

◆ m_cd_WindowBits [1/2]

int CZipCompression::m_cd_WindowBits
protected

The base two logarithm of the window size.

Definition at line 490 of file zlib.hpp.

Referenced by CZipCompression::GetWindowBits(), and CZipCompression::SetWindowBits().

◆ m_cd_WindowBits [2/2]

int CZipCloudflareCompression::m_cd_WindowBits
protected

The base two logarithm of the window size.

Definition at line 484 of file zlib_cloudflare.hpp.

Referenced by CZipCloudflareCompression::GetWindowBits(), and CZipCloudflareCompression::SetWindowBits().

◆ m_Comment

string CArchiveEntryInfo::m_Comment
protected

◆ m_Compressed

CDynamicCharArray CNlmZipReader::m_Compressed
private

Definition at line 155 of file reader_zlib.hpp.

Referenced by CNlmZipReader::x_DecompressBuffer().

◆ m_CompressedSize

Uint8 CArchiveEntryInfo::m_CompressedSize
protected

Compressed size.

Definition at line 168 of file archive_.hpp.

Referenced by CArchiveEntryInfo::Reset().

◆ m_CRC32 [1/2]

unsigned long CZipCompressor::m_CRC32
private

CRC32 for compressed data.

Definition at line 694 of file zlib.hpp.

◆ m_CRC32 [2/2]

unsigned long CZipCloudflareCompressor::m_CRC32
private

CRC32 for compressed data.

Definition at line 688 of file zlib_cloudflare.hpp.

◆ m_Current [1/2]

CArchiveEntryInfo CArchive::m_Current
protected

◆ m_Current [2/2]

CTarEntryInfo CTar::m_Current
private

◆ m_d_SmallDecompress

int CBZip2Compression::m_d_SmallDecompress
protected

Use memory-frugal decompression algorithm.

Definition at line 300 of file bzip2.hpp.

Referenced by CBZip2Compression::GetSmallDecompress(), and CBZip2Compression::SetSmallDecompress().

◆ m_Data

const void* CCompressionDictionary::m_Data
private

Pointer to the dictionary data.

Definition at line 449 of file compress.hpp.

Referenced by CCompressionDictionary::Free(), CCompressionDictionary::GetData(), and CCompressionDictionary::LoadFromStream().

◆ m_DecompressMode

EDecompressMode CCompression::m_DecompressMode
protected

Decompress mode (Decompress/TransparentRead/Unknown)

Definition at line 336 of file compress.hpp.

Referenced by CLZODecompressor::Finish(), CLZODecompressor::Flush(), CLZOCompressor::Init(), CLZODecompressor::Init(), and CLZODecompressor::Process().

◆ m_Decompressor [1/2]

unique_ptr<CResultZBtSrcX> CNlmZipBtRdr::m_Decompressor
private

Definition at line 71 of file reader_zlib.hpp.

Referenced by CNlmZipBtRdr::Read().

◆ m_Decompressor [2/2]

unique_ptr<CZipCompression> CNlmZipReader::m_Decompressor
private

◆ m_Dict

CCompressionDictionary* CCompression::m_Dict
protected

Dictionary for compression/decompression.

Definition at line 339 of file compress.hpp.

Referenced by CCompression::~CCompression().

◆ m_DictOwn

ENcbiOwnership CCompression::m_DictOwn
protected

Dictionary ownership.

Definition at line 340 of file compress.hpp.

Referenced by CCompression::~CCompression().

◆ m_EOF

bool CBZip2CompressionFile::m_EOF
protected

EOF flag for read mode.

Definition at line 415 of file bzip2.hpp.

◆ m_ErrorCode

int CCompression::m_ErrorCode
private

Last compressor action error/status.

Definition at line 344 of file compress.hpp.

Referenced by CCompression::GetErrorCode(), and CCompression::SetError().

◆ m_ErrorMsg

string CCompression::m_ErrorMsg
private

Last compressor action error message.

Definition at line 345 of file compress.hpp.

Referenced by CCompression::GetErrorDescription(), and CCompression::SetError().

◆ m_fd

int CArchiveCompressionFileStream::m_fd
protected

◆ m_File [1/4]

TFile CCompressionFile::m_File
protected

File handler.

Definition at line 405 of file compress.hpp.

◆ m_File [2/4]

CNcbiFstream* CLZOCompressionFile::m_File
protected

File stream.

Definition at line 601 of file lzo.hpp.

Referenced by CLZOCompressionFile::Close(), and CLZOCompressionFile::Open().

◆ m_File [3/4]

CNcbiFstream* CZipCompressionFile::m_File
protected

File stream.

Definition at line 638 of file zlib.hpp.

◆ m_File [4/4]

CNcbiFstream* CZipCloudflareCompressionFile::m_File
protected

File stream.

Definition at line 632 of file zlib_cloudflare.hpp.

◆ m_FileInfo [1/3]

SFileInfo CLZOCompressor::m_FileInfo
private

Compressed file info.

Definition at line 703 of file lzo.hpp.

Referenced by CLZOCompressor::Finish(), CLZOCompressor::Process(), and CLZOCompressor::SetFileInfo().

◆ m_FileInfo [2/3]

SFileInfo CZipCompressor::m_FileInfo
private

Compressed file info.

Definition at line 698 of file zlib.hpp.

◆ m_FileInfo [3/3]

SFileInfo CZipCloudflareCompressor::m_FileInfo
private

Compressed file info.

Definition at line 692 of file zlib_cloudflare.hpp.

◆ m_FileName [1/2]

string CArchiveFile::m_FileName
protected

Archive file name.

Definition at line 521 of file archive.hpp.

Referenced by CArchiveFile::CArchiveFile(), and CArchiveFile::Open().

◆ m_FileName [2/2]

string CTar::m_FileName
private

Tar archive file name (only if file)

Definition at line 776 of file tar.hpp.

Referenced by CTar::x_Close(), CTar::x_ExtractSparseFile(), CTar::x_Open(), CTar::x_ReadAndProcess(), and CTar::x_ReadEntryInfo().

◆ m_FileStream [1/3]

FILE* CArchiveCompressionFileStream::m_FileStream
protected

◆ m_FileStream [2/3]

FILE* CBZip2CompressionFile::m_FileStream
protected

Underlying file stream.

Definition at line 414 of file bzip2.hpp.

◆ m_FileStream [3/3]

CNcbiFstream* CTar::m_FileStream
private

File stream of the archive (if file)

Definition at line 777 of file tar.hpp.

Referenced by CTar::x_Backspace(), CTar::x_Close(), CTar::x_Flush(), CTar::x_Open(), CTar::x_ReadArchive(), CTar::x_Skip(), and CTar::~CTar().

◆ m_Flags [1/3]

TFlags CArchive::m_Flags
protected

◆ m_Flags [2/3]

TFlags CCompression::m_Flags
private

Bitwise OR of flags.

Definition at line 346 of file compress.hpp.

Referenced by CCompression::GetFlags(), and CCompression::SetFlags().

◆ m_Flags [3/3]

TFlags CTar::m_Flags
private

◆ m_Format

EFormat CArchive::m_Format
protected

Archive format.

Definition at line 478 of file archive.hpp.

Referenced by CArchive::AppendFileFromMemory(), and CArchive::x_Append().

◆ m_GroupName [1/2]

string CArchiveEntryInfo::m_GroupName
protected

Group name.

Definition at line 166 of file archive_.hpp.

Referenced by CArchiveEntryInfo::GetGroupName(), CArchiveEntryInfo::operator==(), and CArchive::x_Append().

◆ m_GroupName [2/2]

string CTarEntryInfo::m_GroupName
protected

◆ m_Handle

SZipHandle* CArchiveZip::m_Handle
protected

Archive handle.

Definition at line 271 of file archive_zip.hpp.

Referenced by CArchiveZip::~CArchiveZip().

◆ m_HaveData

bool CBZip2CompressionFile::m_HaveData
protected

Flag that we read/write some data.

Definition at line 416 of file bzip2.hpp.

◆ m_Header

EHeader CNlmZipReader::m_Header
private

◆ m_HeaderFlags

TLZOFlags CLZODecompressor::m_HeaderFlags
private

Flags used for compression.

Definition at line 755 of file lzo.hpp.

Referenced by CLZODecompressor::DecompressCache(), and CLZODecompressor::Process().

◆ m_HeaderLen

size_t CLZODecompressor::m_HeaderLen
private

Length of the header.

Definition at line 754 of file lzo.hpp.

Referenced by CLZODecompressor::Finish(), CLZODecompressor::Init(), and CLZODecompressor::Process().

◆ m_HeaderSize

streamsize CTarEntryInfo::m_HeaderSize
protected

Total size of all headers for the entry.

Definition at line 252 of file tar.hpp.

Referenced by CTarEntryInfo::GetPosition(), CTarEntryInfo::operator==(), CTar::x_ReadAndProcess(), CTar::x_ReadEntryInfo(), and CTar::x_WriteEntryInfo().

◆ m_InBuf

char* CLZOBuffer::m_InBuf
private

◆ m_Index

size_t CArchiveEntryInfo::m_Index
protected

Entry index in the archive.

Definition at line 160 of file archive_.hpp.

Referenced by CArchiveEntryInfo::GetIndex(), CArchiveEntryInfo::operator==(), and CArchiveEntryInfo::Reset().

◆ m_InitialAllocationSize

size_t CArchiveMemory::m_InitialAllocationSize
protected

< Initial allocation size for created archive

Definition at line 618 of file archive.hpp.

Referenced by CArchiveMemory::CArchiveMemory(), CArchiveMemory::Create(), and CArchiveMemory::Open().

◆ m_InLen

size_t CLZOBuffer::m_InLen
private

◆ m_InSize

size_t CLZOBuffer::m_InSize
private

Size of the input buffer.

Definition at line 635 of file lzo.hpp.

Referenced by CLZOBuffer::CLZOBuffer(), CLZOCompressor::Process(), CLZODecompressor::Process(), and CLZOBuffer::ResetBuffer().

◆ m_IsGZ [1/2]

bool CZipDecompressor::m_IsGZ
private

TRUE if data have gzip format.

Definition at line 741 of file zlib.hpp.

◆ m_IsGZ [2/2]

bool CZipCloudflareDecompressor::m_IsGZ
private

TRUE if data have gzip format.

Definition at line 735 of file zlib_cloudflare.hpp.

◆ m_Level

ELevel CCompression::m_Level
private

Compression level.

Definition at line 343 of file compress.hpp.

Referenced by CCompression::GetLevel(), and CCompression::SetLevel().

◆ m_LinkName [1/2]

string CArchiveEntryInfo::m_LinkName
protected

Link name if type is eLink.

Definition at line 164 of file archive_.hpp.

Referenced by CArchiveEntryInfo::GetLinkName(), CArchiveEntryInfo::operator==(), and CArchive::x_Append().

◆ m_LinkName [2/2]

string CTarEntryInfo::m_LinkName
protected

◆ m_Location [1/2]

IArchive::ELocation CArchive::m_Location
protected

◆ m_Location [2/2]

ELocation IArchive::m_Location
protected

◆ m_Mask

SMask CTar::m_Mask[2]
private

Entry masks for operations.

Definition at line 785 of file tar.hpp.

Referenced by CTar::SetMask(), CTar::x_Append(), CTar::x_ReadAndProcess(), and CTar::~CTar().

◆ m_MaskFullPath

SMask CArchive::m_MaskFullPath
protected

Set of masks for operations (full path)

Definition at line 483 of file archive.hpp.

Referenced by CArchive::SetMask(), CArchive::x_Append(), and CArchive::x_ReadAndProcess().

◆ m_MaskPattern

SMask CArchive::m_MaskPattern
protected

Set of masks for operations (path components)

Definition at line 484 of file archive.hpp.

Referenced by CArchive::SetMask(), CArchive::x_Append(), and CArchive::x_ReadAndProcess().

◆ m_Mode [1/5]

EDirection IArchive::m_Mode
protected

◆ m_Mode [2/5]

EMode CCompressionFile::m_Mode
protected

File open mode.

Definition at line 406 of file compress.hpp.

◆ m_Mode [3/5]

EMode CLZOCompressionFile::m_Mode
protected

I/O mode (read/write).

Definition at line 600 of file lzo.hpp.

Referenced by CLZOCompressionFile::Close(), CLZOCompressionFile::Open(), CLZOCompressionFile::Read(), and CLZOCompressionFile::Write().

◆ m_Mode [4/5]

EMode CZipCompressionFile::m_Mode
protected

I/O mode (read/write).

Definition at line 637 of file zlib.hpp.

◆ m_Mode [5/5]

EMode CZipCloudflareCompressionFile::m_Mode
protected

I/O mode (read/write).

Definition at line 631 of file zlib_cloudflare.hpp.

◆ m_Modified [1/2]

bool CArchive::m_Modified
protected

True after at least one write.

Definition at line 486 of file archive.hpp.

Referenced by CArchive::Close(), CArchive::x_Append(), and CArchive::x_AppendEntry().

◆ m_Modified [2/2]

bool CTar::m_Modified
private

True after at least one write.

Definition at line 787 of file tar.hpp.

Referenced by CTar::x_Close(), CTar::x_Flush(), CTar::x_Open(), and CTar::x_WriteArchive().

◆ m_Name [1/2]

string CArchiveEntryInfo::m_Name
protected

◆ m_Name [2/2]

string CTarEntryInfo::m_Name
protected

◆ m_NeedCheckHeader [1/2]

bool CZipDecompressor::m_NeedCheckHeader
private

TRUE if needed to check to file header.

Definition at line 740 of file zlib.hpp.

◆ m_NeedCheckHeader [2/2]

bool CZipCloudflareDecompressor::m_NeedCheckHeader
private

TRUE if needed to check to file header.

Definition at line 734 of file zlib_cloudflare.hpp.

◆ m_NeedWriteHeader [1/3]

bool CLZOCompressor::m_NeedWriteHeader
private

TRUE if needed to write a header.

Definition at line 702 of file lzo.hpp.

Referenced by CLZOCompressor::Finish(), CLZOCompressor::Init(), and CLZOCompressor::Process().

◆ m_NeedWriteHeader [2/3]

bool CZipCompressor::m_NeedWriteHeader
private

Is true if needed to write a file header.

Definition at line 696 of file zlib.hpp.

◆ m_NeedWriteHeader [3/3]

bool CZipCloudflareCompressor::m_NeedWriteHeader
private

Is true if needed to write a file header.

Definition at line 690 of file zlib_cloudflare.hpp.

◆ m_OpenMode [1/2]

EOpenMode CArchive::m_OpenMode
protected

◆ m_OpenMode [2/2]

EOpenMode CTar::m_OpenMode
private

What was it opened for.

Definition at line 786 of file tar.hpp.

Referenced by CTar::GetNextEntryInfo(), CTar::x_Close(), CTar::x_Flush(), and CTar::x_Open().

◆ m_OutBegPtr

char* CLZOBuffer::m_OutBegPtr
private

◆ m_OutBuf

char* CLZOBuffer::m_OutBuf
private

◆ m_OutEndPtr

char* CLZOBuffer::m_OutEndPtr
private

◆ m_OutputSize

size_t CCompressionProcessor::m_OutputSize
private

Definition at line 564 of file compress.hpp.

◆ m_OutSize

size_t CLZOBuffer::m_OutSize
private

◆ m_Own [1/2]

ENcbiOwnership CCompressionDictionary::m_Own
private

Data ownership.

Definition at line 451 of file compress.hpp.

Referenced by CCompressionDictionary::Free(), and CCompressionDictionary::LoadFromStream().

◆ m_Own [2/2]

TOwnership CNlmZipReader::m_Own
private

Definition at line 149 of file reader_zlib.hpp.

Referenced by CNlmZipReader::~CNlmZipReader().

◆ m_OwnBuf

AutoArray<char> CArchiveMemory::m_OwnBuf
protected

Holder for the pointer to memory buffer that will be automatically deallocated if we own it (used for Load() only).

m_Buf will have the same pointer value.

Definition at line 615 of file archive.hpp.

Referenced by CArchiveMemory::Create(), and CArchiveMemory::Load().

◆ m_Param

unique_ptr<SCompressionParam> CLZOCompression::m_Param
protected

Compression parameters.

Definition at line 456 of file lzo.hpp.

Referenced by CLZOCompression::CLZOCompression(), CLZOCompression::CompressBlock(), and CLZOCompression::InitCompression().

◆ m_Path

string CTarEntryInfo::m_Path
protected

Iff filesystem involved in processing.

Definition at line 256 of file tar.hpp.

Referenced by CTarEntryInfo::GetPath(), CTar::x_Append(), and CTar::x_ProcessEntry().

◆ m_Pos

Uint8 CTarEntryInfo::m_Pos
protected

◆ m_ProcessedSize

size_t CCompressionProcessor::m_ProcessedSize
private

Definition at line 563 of file compress.hpp.

◆ m_Reader

IReader* CNlmZipReader::m_Reader
private

◆ m_Size [1/3]

size_t CCompressionDictionary::m_Size
private

◆ m_Size [2/3]

size_t CLZOBuffer::m_Size
private

Size of in/out buffers.

Definition at line 632 of file lzo.hpp.

◆ m_Size [3/3]

size_t CDynamicCharArray::m_Size
private

Definition at line 97 of file reader_zlib.hpp.

Referenced by CDynamicCharArray::Alloc(), and CDynamicCharArray::At().

◆ m_SkipInput [1/2]

size_t CZipDecompressor::m_SkipInput
private

Number of bytes to skip from input stream.

Used to process concatenated .gz files.

Definition at line 742 of file zlib.hpp.

◆ m_SkipInput [2/2]

size_t CZipCloudflareDecompressor::m_SkipInput
private

Number of bytes to skip from input stream.

Used to process concatenated .gz files.

Definition at line 736 of file zlib_cloudflare.hpp.

◆ m_Src

CRef<CByteSourceReader> CNlmZipBtRdr::m_Src
private

Definition at line 69 of file reader_zlib.hpp.

Referenced by CNlmZipBtRdr::Pushback(), and CNlmZipBtRdr::Read().

◆ m_Stat [1/2]

TNcbiSys_stat CArchiveEntryInfo::m_Stat
protected

◆ m_Stat [2/2]

CDirEntry::SStat CTarEntryInfo::m_Stat
protected

◆ m_Stream [1/7]

void* CBZip2Compression::m_Stream
protected

Compressor stream.

Definition at line 298 of file bzip2.hpp.

◆ m_Stream [2/7]

CCompressionIOStream* CLZOCompressionFile::m_Stream
protected

◆ m_Stream [3/7]

CNcbiIos& CTar::m_Stream
private

◆ m_Stream [4/7]

void* CZipCompression::m_Stream
protected

Compressor stream.

Definition at line 489 of file zlib.hpp.

◆ m_Stream [5/7]

CCompressionIOStream* CZipCompressionFile::m_Stream
protected

[De]comression stream.

Definition at line 639 of file zlib.hpp.

◆ m_Stream [6/7]

void* CZipCloudflareCompression::m_Stream
protected

Compressor stream.

Definition at line 483 of file zlib_cloudflare.hpp.

◆ m_Stream [7/7]

CCompressionIOStream* CZipCloudflareCompressionFile::m_Stream
protected

[De]comression stream.

Definition at line 633 of file zlib_cloudflare.hpp.

◆ m_StreamPos

Uint8 CTar::m_StreamPos
private

◆ m_Type [1/3]

CDirEntry::EType CArchiveEntryInfo::m_Type
protected

◆ m_Type [2/3]

EType CNlmZipBtRdr::m_Type
private

Definition at line 70 of file reader_zlib.hpp.

Referenced by CNlmZipBtRdr::Pushback(), and CNlmZipBtRdr::Read().

◆ m_Type [3/3]

EType CTarEntryInfo::m_Type
protected

◆ m_UserName [1/2]

string CArchiveEntryInfo::m_UserName
protected

User name.

Definition at line 165 of file archive_.hpp.

Referenced by CArchiveEntryInfo::GetUserName(), CArchiveEntryInfo::operator==(), and CArchive::x_Append().

◆ m_UserName [2/2]

string CTarEntryInfo::m_UserName
protected

◆ m_WorkMem

AutoArray<char> CLZOCompression::m_WorkMem
protected

Working memory for compressor.

Definition at line 455 of file lzo.hpp.

Referenced by CLZOCompression::CompressBlock(), and CLZOCompression::InitCompression().

◆ m_ZeroBlockCount

size_t CTar::m_ZeroBlockCount
private

Zero blocks seen in between entries.

Definition at line 779 of file tar.hpp.

Referenced by CTar::x_Backspace(), CTar::x_Flush(), CTar::x_ReadAndProcess(), CTar::x_ReadArchive(), and CTar::x_WriteArchive().

◆ mask [1/2]

CMask* CArchive::SMask::mask

Definition at line 408 of file archive.hpp.

Referenced by CArchive::SetMask(), CArchive::x_Append(), and CArchive::x_ReadAndProcess().

◆ mask [2/2]

CMask* CTar::SMask::mask

Definition at line 692 of file tar.hpp.

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

◆ mtime [1/3]

time_t CLZOCompression::SFileInfo::mtime

Definition at line 362 of file lzo.hpp.

◆ mtime [2/3]

time_t CZipCompression::SFileInfo::mtime

Definition at line 358 of file zlib.hpp.

◆ mtime [3/3]

time_t CZipCloudflareCompression::SFileInfo::mtime

Definition at line 352 of file zlib_cloudflare.hpp.

◆ name [1/3]

string CLZOCompression::SFileInfo::name

Definition at line 360 of file lzo.hpp.

◆ name [2/3]

string CZipCompression::SFileInfo::name

Definition at line 356 of file zlib.hpp.

◆ name [3/3]

string CZipCloudflareCompression::SFileInfo::name

Definition at line 350 of file zlib_cloudflare.hpp.

◆ owned [1/2]

EOwnership CArchive::SMask::owned

Definition at line 410 of file archive.hpp.

Referenced by CArchive::SetMask().

◆ owned [2/2]

EOwnership CTar::SMask::owned

Definition at line 694 of file tar.hpp.

Referenced by CTar::SetMask().

Friends

◆ CArchive

friend class CArchive
friend

Definition at line 170 of file archive_.hpp.

◆ CArchiveZip

friend class CArchiveZip
friend

Definition at line 171 of file archive_.hpp.

◆ CCompressionStream

friend class CCompressionStream
friend

Definition at line 567 of file compress.hpp.

◆ CCompressionStreambuf [1/2]

friend class CCompressionStreambuf
friend

Definition at line 349 of file compress.hpp.

◆ CCompressionStreambuf [2/2]

friend class CCompressionStreambuf
friend

Definition at line 568 of file compress.hpp.

◆ CCompressionStreamProcessor

friend class CCompressionStreamProcessor
friend

Definition at line 569 of file compress.hpp.

◆ CLZOCompressor

friend class CLZOCompressor
friend

Definition at line 643 of file lzo.hpp.

◆ CLZODecompressor

friend class CLZODecompressor
friend

Definition at line 644 of file lzo.hpp.

◆ CTar [1/2]

friend class CTar
friend

Definition at line 258 of file tar.hpp.

◆ CTar [2/2]

friend class CTar
friend

Definition at line 275 of file tar.hpp.

◆ CTarReader

friend class CTarReader
friend

Definition at line 798 of file tar.hpp.

Referenced by CTar::Extract(), and CTar::GetNextEntryData().

Modified on Tue Jul 23 17:48:02 2024 by modify_doxy.py rev. 669887