|
NCBI C++ ToolKit
|
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< CArchiveEntryInfo > | CArchive::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< CTarEntryInfo > | CTar::TEntries |
| Define a list of entries. More... | |
| 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). More... | |
| typedef list< TFile > | CTar::TFiles |
| typedef CZipCompression::TFlags | CZipCompression::TZipFlags |
| Bitwise OR of EFlags. More... | |
| typedef CZipCloudflareCompression::TFlags | CZipCloudflareCompression::TZipFlags |
| Bitwise OR of EFlags. 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< TEntries > | CArchive::List (void) |
| Get information about archive entries. More... | |
| virtual unique_ptr< TEntries > | CArchive::Test (void) |
| Verify archive integrity. More... | |
| virtual unique_ptr< TEntries > | CArchive::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< TEntries > | CArchive::Append (const string &path, ELevel level=CCompression::eLevel_Default, const string &comment=kEmptyStr) |
| Append an entry to the archive. More... | |
| virtual 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) |
| 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 string & | CArchive::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< TEntries > | CArchive::x_ReadAndProcess (EAction action) |
| unique_ptr< TEntries > | CArchive::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 |
| CArchive & | CArchive::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... | |
| CArchiveFile & | CArchiveFile::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... | |
| CArchiveMemory & | CArchiveMemory::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... | |
| CArchiveCompressionFileStream & | CArchiveCompressionFileStream::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 string & | CArchiveEntryInfo::GetName (void) const |
| const string & | CArchiveEntryInfo::GetLinkName (void) const |
| const string & | CArchiveEntryInfo::GetUserName (void) const |
| const string & | CArchiveEntryInfo::GetGroupName (void) const |
| const string & | CArchiveEntryInfo::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... | |
| CBZip2Compression & | CBZip2Compression::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... | |
| CBZip2CompressionFile & | CBZip2CompressionFile::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... | |
| CBZip2Compressor * | CBZip2StreamCompressor::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... | |
| CBZip2Decompressor * | CBZip2StreamDecompressor::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... | |
| CLZOCompression & | CLZOCompression::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... | |
| CLZOCompressionFile & | CLZOCompressionFile::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... | |
| CLZOBuffer & | CLZOBuffer::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... | |
| CLZOCompressor * | CLZOStreamCompressor::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... | |
| CLZODecompressor * | CLZOStreamDecompressor::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 CNlmZipBtRdr & | CNlmZipBtRdr::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 CNlmZipReader & | CNlmZipReader::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 string & | CTarEntryInfo::GetName (void) const |
| const string & | CTarEntryInfo::GetLinkName (void) const |
| const string & | CTarEntryInfo::GetUserName (void) const |
| const string & | CTarEntryInfo::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 string & | CTarEntryInfo::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< TEntries > | CTar::Append (const string &name) |
| Append an entry at the end of the archive that already exists. More... | |
| unique_ptr< TEntries > | CTar::Append (const CTarUserEntryInfo &entry, CNcbiIstream &is) |
| Append an entry from a stream (exactly entry.GetSize() bytes). More... | |
| unique_ptr< TEntries > | CTar::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< TEntries > | CTar::Extract (void) |
| Extract the entire archive (into either current directory or a directory otherwise specified by SetBaseDir()). More... | |
| unique_ptr< TEntries > | CTar::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 string & | CTar::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 CTarEntryInfo * | CTar::GetNextEntryInfo (void) |
| Iterate over the archive forward and return first (or next) entry. More... | |
| IReader * | CTar::GetNextEntryData (void) |
| Create and return an IReader, which can extract the current archive entry that has been previously returned via GetNextEntryInfo. More... | |
| static IReader * | CTar::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< TEntries > | CTar::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< TEntries > | CTar::x_Append (const string &name, const TEntries *toc=0) |
| unique_ptr< TEntries > | CTar::x_Append (const CTarUserEntryInfo &entry, CNcbiIstream &is) |
| void | CTar::x_AppendStream (const string &name, CNcbiIstream &is) |
| bool | CTar::x_AppendFile (const string &file) |
| CTar & | CTar::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... | |
| CZipCompression & | CZipCompression::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... | |
| CZipCompressionFile & | CZipCompressionFile::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... | |
| CZipCompressor * | CZipStreamCompressor::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... | |
| CZipDecompressor * | CZipStreamDecompressor::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... | |
| CZipCloudflareCompression & | CZipCloudflareCompression::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... | |
| CZipCloudflareCompressionFile & | CZipCloudflareCompressionFile::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... | |
| CZipCloudflareCompressor * | CZipCloudflareStreamCompressor::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... | |
| CZipCloudflareDecompressor * | CZipCloudflareStreamDecompressor::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... | |
| #define COMPRESS_HANDLE_EXCEPTIONS | ( | subcode, | |
| message | |||
| ) |
Macro to catch and handle exceptions (from streams in the destructor)
Definition at line 87 of file compress.hpp.
| #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 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.
| info | A current entry that is processed. |
| buf | Pointer to buffer with data. |
| n | Size of data in the buffer. |
Definition at line 216 of file archive_.hpp.
| typedef CCompression::ELevel CArchive::ELevel |
Definition at line 65 of file archive.hpp.
| typedef CCompression::ELevel IArchive::ELevel |
Definition at line 189 of file archive_.hpp.
Archive entry type (the same as directory entry type).
Definition at line 115 of file archive_.hpp.
| typedef list<CArchiveEntryInfo> CArchive::TEntries |
Define a list of entries.
Definition at line 111 of file archive.hpp.
| typedef list<CTarEntryInfo> CTar::TEntries |
| typedef void* CCompressionFile::TFile |
Compression file handler.
Definition at line 368 of file compress.hpp.
| typedef pair<string, Uint8> CTar::TFile |
| typedef list<TFile> CTar::TFiles |
| typedef unsigned int CArchive::TFlags |
Bitwise OR of EFlags.
Definition at line 108 of file archive.hpp.
| 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.
| typedef unsigned int CTar::TFlags |
| typedef int CNlmZipReader::TOwnership |
Definition at line 116 of file reader_zlib.hpp.
| typedef Uint8 IChunkHandler::TPosition |
Type to store stream positions.
Definition at line 633 of file compress.hpp.
Bitwise OR of EFlags.
Definition at line 121 of file zlib_cloudflare.hpp.
| anonymous enum |
| Enumerator | |
|---|---|
| kInititialSize | |
Definition at line 78 of file reader_zlib.hpp.
| anonymous enum |
| Enumerator | |
|---|---|
| kHeaderSize | |
Definition at line 118 of file reader_zlib.hpp.
|
protected |
Action, performed on the archive.
| Enumerator | |
|---|---|
| eUndefined | |
| eCreate | |
| eAppend | |
| eList | |
| eUpdate | |
| eExtract | |
| eTest | |
Definition at line 396 of file archive.hpp.
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.
|
private |
|
protected |
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.
| enum IArchive::EDirection |
Processing direction.
| Enumerator | |
|---|---|
| eRead | Reading from archive. |
| eWrite | Writing into archive. |
Definition at line 192 of file archive_.hpp.
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.
| Enumerator | |
|---|---|
| eCompression | Compression/decompression error. |
| eCompressionFile | Compression/decompression file error. |
Definition at line 583 of file compress.hpp.
| enum CArchive::EFlags |
General flags.
Definition at line 73 of file archive.hpp.
Compression/decompression flags.
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.
|
| fStoreFileInfo | Store file information like file name and file modification date of the compressed file into the file/stream. Works only with fStreamFormat flag. |
| enum CTar::EFlags |
General flags.
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.
|
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.
|
Definition at line 81 of file zlib_cloudflare.hpp.
| enum CArchive::EFormat |
| Enumerator | |
|---|---|
| eHeaderNone | |
| eHeaderAlways | |
| eHeaderCheck | |
Definition at line 121 of file reader_zlib.hpp.
| 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).
| 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.
| enum IArchive::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.
| enum CArchive::EMaskType |
| Enumerator | |
|---|---|
| eFullPathMask | |
| ePatternMask | |
Definition at line 319 of file archive.hpp.
| enum CTar::EMaskType |
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.
|
protected |
|
private |
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.
| enum CTarEntryInfo::EPos |
Type of the result of all basic functions.
Definition at line 467 of file compress.hpp.
|
private |
| Enumerator | |
|---|---|
| eFeature_Type | |
| eFeature_AbsolutePath | |
| eFeature_FileStream | |
Definition at line 371 of file archive.hpp.
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. |
| eFeature_Dictionary | Check if current compression have support for dictionaries. Without support SetDictionary() always return FALSE.
|
| eFeature_EstimateCompressionBufferSize | Check if current compression have implementation for the EstimateCompressionBufferSize() method. Without support it always return 0. |
Definition at line 191 of file compress.hpp.
| enum ETarModeBits |
TTarMode –.
Permission bits as defined in tar
| enum CNlmZipBtRdr::EType | ( | void | ) |
| Enumerator | |
|---|---|
| eType_unknown | |
| eType_plain | |
| eType_zlib | |
Definition at line 56 of file reader_zlib.hpp.
| 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. |
|
virtual |
Add single entry to newly created archive from file system.
| info | Entry 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_path | Path to file system object to add. |
| level | Compression level used to compress file . |
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.
|
pure virtual |
Add single entry to newly created archive from file system.
| info | Entry 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_path | Path to file system object to add. |
| level | Compression level used to compress file . |
Implemented in CArchiveZip.
|
virtual |
Add entry to newly created archive from memory buffer.
| info | Entry information to add. It should have name and type of adding entry at least. |
| buf | Memory buffer with data to add. |
| size | Size of data in memory buffer. |
| level | Compression level for added data. |
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.
|
pure virtual |
Add entry to newly created archive from memory buffer.
| info | Entry information to add. It should have name and type of adding entry at least. |
| buf | Memory buffer with data to add. |
| size | Size of data in memory buffer. |
| level | Compression level for added data. |
Implemented in CArchiveZip.
| char * CDynamicCharArray::Alloc | ( | size_t | size | ) |
Definition at line 58 of file reader_zlib.cpp.
References CDynamicCharArray::kInititialSize, CDynamicCharArray::m_Array, CDynamicCharArray::m_Size, and ncbi::grid::netcache::search::fields::size.
Referenced by CNlmZipReader::Read(), CResultZBtSrcX::ReadLength(), and CNlmZipReader::x_DecompressBuffer().
|
inlinevirtual |
Return TRUE if fAllowEmptyData flag is set.
Implements CCompressionProcessor.
Definition at line 451 of file bzip2.hpp.
References CBZip2Compression::fAllowEmptyData, and CCompression::GetFlags().
|
inlinevirtual |
Return TRUE if fAllowEmptyData flag is set.
Implements CCompressionProcessor.
Definition at line 489 of file bzip2.hpp.
References CBZip2Compression::fAllowEmptyData, and CCompression::GetFlags().
|
inlinevirtual |
Return TRUE if fAllowEmptyData flag is set.
Implements CCompressionProcessor.
Definition at line 679 of file lzo.hpp.
References CLZOCompression::fAllowEmptyData, and CCompression::GetFlags().
|
inlinevirtual |
Return TRUE if fAllowEmptyData flag is set.
Implements CCompressionProcessor.
Definition at line 729 of file lzo.hpp.
References CLZOCompression::fAllowEmptyData, and CCompression::GetFlags().
|
inlinevirtual |
Return TRUE if fAllowEmptyData flag is set.
Implements CCompressionProcessor.
Definition at line 678 of file zlib.hpp.
References CZipCompression::fAllowEmptyData, and CCompression::GetFlags().
|
inlinevirtual |
Return TRUE if fAllowEmptyData flag is set.
Implements CCompressionProcessor.
Definition at line 724 of file zlib.hpp.
References CZipCompression::fAllowEmptyData, and CCompression::GetFlags().
|
inlinevirtual |
Return TRUE if fAllowEmptyData flag is set.
Implements CCompressionProcessor.
Definition at line 672 of file zlib_cloudflare.hpp.
References CZipCloudflareCompression::fAllowEmptyData, and CCompression::GetFlags().
|
inlinevirtual |
Return TRUE if fAllowEmptyData flag is set.
Implements CCompressionProcessor.
Definition at line 718 of file zlib_cloudflare.hpp.
References CZipCloudflareCompression::fAllowEmptyData, and CCompression::GetFlags().
|
pure virtual |
Return TRUE if fAllowEmptyData flag is set for this compression.
Implemented in CZipCloudflareDecompressor, CZipCloudflareCompressor, CZipDecompressor, CZipCompressor, CTransparentProcessor, CLZODecompressor, CLZOCompressor, CBZip2Decompressor, and CBZip2Compressor.
Referenced by CCompressionStreambuf::xsgetn().
|
inline |
Append an entry from a stream (exactly entry.GetSize() bytes).
Definition at line 827 of file tar.hpp.
References CTar::eAppend, CTar::x_Append(), and CTar::x_Open().
|
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.
Definition at line 820 of file tar.hpp.
References CTar::eAppend, CTar::x_Append(), and CTar::x_Open().
|
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).
| path | Path to appended entry. |
| level | Compression level (if selected format support it, or default). |
| comment | Optional comment for the appended entry (if selected format support it). For directories the comment will be added to upper directory only. |
Definition at line 451 of file archive.cpp.
References ARCHIVE_CHECK, CArchive::eAppend, CArchive::x_Append(), and CArchive::x_Open().
Definition at line 557 of file archive.cpp.
References ARCHIVE, and CArchive::m_Current.
Referenced by CArchive::x_AppendEntry().
|
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.
| name_in_archive | Name 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. |
| buf | Buffer with data to add. |
| buf_size | Size of data in the buffer. |
| level | Compression level (if selected format support it, or default). |
| comment | Optional comment for the appended entry (if selected format support it). |
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().
|
inline |
Definition at line 89 of file reader_zlib.hpp.
References _ASSERT, CDynamicCharArray::m_Array, and CDynamicCharArray::m_Size.
Referenced by CResultZBtSrcX::Read(), CNlmZipReader::Read(), and CNlmZipReader::x_DecompressBuffer().
|
protected |
Construct an archive object of specified format.
Declared as protected to avoid direct usage. Use derived classes CArchiveFile or CArchiveMemory instead.
| format | Archive format |
Definition at line 211 of file archive.cpp.
References ARCHIVE, ARCHIVE_THROW, CArchive::eZip, format, NStr::IntToString(), and CArchive::m_Archive.
|
private |
| CArchiveCompressionFileStream::CArchiveCompressionFileStream | ( | EFormat | format, |
| FILE * | filestream | ||
| ) |
Create new archive on a base of already opened FILE* stream, beginning at the current FILE* position.
| format | Archive format. |
| filestream | File stream that can be used for archive operations. It should be opened for writing binary data. |
Definition at line 1273 of file archive.cpp.
References CArchiveCompressionFileStream::Create(), IArchive::eFileStream, CArchiveCompressionFileStream::m_fd, CArchiveCompressionFileStream::m_FileStream, and CArchive::m_Location.
Constructor for stream-based archive.
| format | Archive format. |
| fd | File/socket descriptor to write archive to. Socket descriptor should be already connected and file descriptor should be opened for writing before creating an archive. |
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.
|
inline |
Definition at line 118 of file archive_.hpp.
References CArchiveEntryInfo::Reset().
|
private |
Constructor for file-based archive.
| format | Archive format. |
| filename | Path to archive file name. Note, that directory in that archive file will be create should exists. |
Definition at line 1119 of file archive.cpp.
References IArchive::eFile, CArchive::fDefault, CArchiveFile::m_FileName, CArchive::m_Flags, and CArchive::m_Location.
|
private |
Constructor for memory-based archive.
| format | Archive format. |
| buf | Pointer 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_size | Size of the archive. |
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.
|
inline |
Constructor.
Definition at line 70 of file archive_zip.hpp.
|
private |
Private copy constructor to prohibit copy.
| CBZip2Compression::CBZip2Compression | ( | ELevel | level = eLevel_Default | ) |
Constructor.
|
private |
Private copy constructor to prohibit copy.
| 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.
| CBZip2CompressionFile::CBZip2CompressionFile | ( | ELevel | level = eLevel_Default | ) |
Conventional constructor.
| CBZip2Compressor::CBZip2Compressor | ( | ELevel | level = eLevel_Default, |
| TBZip2Flags | flags = 0 |
||
| ) |
Constructor.
| CBZip2Decompressor::CBZip2Decompressor | ( | TBZip2Flags | flags = 0 | ) |
Constructor.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| CCompression::CCompression | ( | ELevel | level = eLevel_Default | ) |
Definition at line 46 of file compress.cpp.
Load a dictionary from file.
Throw an CCompressionException on file opening error.
Definition at line 287 of file compress.cpp.
References CFile::GetLength(), in(), CCompressionDictionary::LoadFromStream(), CCompressionDictionary::m_Size, max(), NCBI_THROW, ncbi::grid::netcache::search::fields::size, and string.
| 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::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::CCompressionFile | ( | const string & | path, |
| EMode | mode, | ||
| size_t | compression_in_bufsize = 0, |
||
| size_t | compression_out_bufsize = 0 |
||
| ) |
| CCompressionFile::CCompressionFile | ( | void | ) |
Definition at line 203 of file compress.cpp.
| CCompressionProcessor::CCompressionProcessor | ( | void | ) |
Definition at line 185 of file compress.cpp.
References CCompressionProcessor::Reset().
|
private |
| CDynamicCharArray::CDynamicCharArray | ( | size_t | size | ) |
Definition at line 46 of file reader_zlib.cpp.
|
inline |
Definition at line 82 of file reader_zlib.hpp.
|
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().
|
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().
|
virtual |
Close the archive making sure all pending output is flushed.
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().
|
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().
|
virtual |
Close compressed file.
Flushes all pending output if necessary, closes the compressed file.
Implements CCompressionFile.
|
virtual |
Close compressed file.
Flushes all pending output if necessary, closes the compressed file.
Implements CCompressionFile.
Definition at line 1049 of file lzo.cpp.
References CCompressionFile::eMode_Read, CCompressionStream::eRead, CCompressionStream::eWrite, CCompressionIOStream::Finalize(), CLZOCompressionFile::GetStreamError(), CLZOCompressionFile::m_File, CLZOCompressionFile::m_Mode, and CLZOCompressionFile::m_Stream.
Referenced by CLZOCompression::CompressFile(), CLZOCompression::DecompressFile(), CLZOCompressionFile::Open(), and CLZOCompressionFile::~CLZOCompressionFile().
|
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.
Definition at line 814 of file tar.hpp.
References CTar::x_Close(), and CTar::x_Flush().
Referenced by CDownloadJob::x_DownloadAndExtract().
|
virtual |
Close compressed file.
Flushes all pending output if necessary, closes the compressed file.
Implements CCompressionFile.
|
virtual |
Close compressed file.
Flushes all pending output if necessary, closes the compressed file.
Implements CCompressionFile.
|
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.
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().
|
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.
Implemented in CArchiveZip.
|
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.
|
private |
Private copy constructor to prohibit copy.
| CLZOBuffer::CLZOBuffer | ( | void | ) |
Constructor.
Definition at line 1078 of file lzo.cpp.
References CLZOBuffer::m_InSize, and CLZOBuffer::m_OutSize.
|
private |
Private copy constructor to prohibit copy.
| CLZOCompression::CLZOCompression | ( | ELevel | level = eLevel_Default | ) |
Constructor.
Definition at line 138 of file lzo.cpp.
References CLZOCompression::GetBlockSizeDefault(), CLZOCompression::m_Param, and CLZOCompression::SetBlockSize().
|
private |
Private copy constructor to prohibit copy.
| 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.
Definition at line 868 of file lzo.cpp.
References CCompressionFile::eMode_Read, file_name, NCBI_THROW, and CLZOCompressionFile::Open().
| CLZOCompressionFile::CLZOCompressionFile | ( | ELevel | level = eLevel_Default | ) |
| 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 | ( | TLZOFlags | flags | ) |
Constructor.
Definition at line 1343 of file lzo.cpp.
References flags, CLZOCompression::fStreamFormat, and CCompression::SetFlags().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| CNlmZipBtRdr::CNlmZipBtRdr | ( | CByteSourceReader * | src | ) |
Definition at line 201 of file reader_zlib.cpp.
|
private |
|
private |
| CNlmZipReader::CNlmZipReader | ( | IReader * | reader, |
| TOwnership | own = fOwnNone, |
||
| EHeader | header = eHeaderCheck |
||
| ) |
Definition at line 267 of file reader_zlib.cpp.
References CNlmZipReader::eHeaderNone, and CNlmZipReader::x_StartDecompressor().
|
protected |
Compress block of data.
Definition at line 354 of file lzo.cpp.
References F_ISSET, CLZOCompression::fChecksum, AutoArray< X, Del >::get(), CLZOCompression::GetLZOErrorDescription(), CLZOCompression::m_Param, CLZOCompression::m_WorkMem, n, NULL, CCompression::SetError(), and CCompressionUtil::StoreUI4().
Referenced by CLZOCompression::CompressBlockStream(), and CLZOCompression::CompressBuffer().
|
protected |
Compress block of data for stream format (fStreamFormat flag).
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().
|
virtual |
Compress data in the buffer.
Altogether, the total size of the destination buffer must be little more then size of the source buffer.
| 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. |
Implements ICompression.
Referenced by CT_CompressBuffer().
|
virtual |
Compress data in the buffer.
| 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. |
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().
|
virtual |
Compress data in the buffer.
| src_buf | Source buffer. |
| src_len | Size of data in source buffer. |
| dst_buf | Destination buffer. |
| dst_size | Size 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_len | Size of compressed data in destination buffer. |
Implements ICompression.
Referenced by CId2Compressor::CompressChunk(), CT_CompressBuffer(), and CPdfObject::x_PrintTo().
|
virtual |
Compress data in the buffer.
| src_buf | Source buffer. |
| src_len | Size of data in source buffer. |
| dst_buf | Destination buffer. |
| dst_size | Size 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_len | Size of compressed data in destination buffer. |
Implements ICompression.
|
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().
|
protected |
Compress block of data in the cache buffer.
Definition at line 1319 of file lzo.cpp.
References CLZOCompression::CompressBlockStream(), ERR_COMPRESS, CLZOCompression::FormatErrorMessage(), CLZOBuffer::m_InBuf, CLZOBuffer::m_InLen, CLZOBuffer::m_OutBegPtr, CLZOBuffer::m_OutBuf, CLZOBuffer::m_OutEndPtr, and CLZOBuffer::m_OutSize.
Referenced by CLZOCompressor::Finish(), and CLZOCompressor::Process().
|
virtual |
Compress file.
| src_file | File name of source file. |
| dst_file | File name of result file. |
| file_io_bufsize | Size of the buffer used to read from a source file. Writing happens immediately on receiving some data from a compressor. |
| compression_in_bufsize | Size 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_bufsize | Size of the internal buffer to receive data from a compressor. |
Implements ICompression.
|
virtual |
Compress file.
| src_file | File name of source file. |
| dst_file | File name of result file. |
| file_io_bufsize | Size of the buffer used to read from a source file. Writing happens immediately on receiving some data from a compressor. |
| compression_in_bufsize | Size 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_bufsize | Size of the internal buffer to receive data from a compressor. |
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().
|
virtual |
Compress file.
| src_file | File name of source file. |
| dst_file | File name of result file. |
| file_io_bufsize | Size of the buffer used to read from a source file. Writing happens immediately on receiving some data from a compressor. |
| compression_in_bufsize | Size 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_bufsize | Size of the internal buffer to receive data from a compressor. |
Implements ICompression.
|
virtual |
Compress file.
| src_file | File name of source file. |
| dst_file | File name of result file. |
| file_io_bufsize | Size of the buffer used to read from a source file. Writing happens immediately on receiving some data from a compressor. |
| compression_in_bufsize | Size 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_bufsize | Size of the internal buffer to receive data from a compressor. |
Implements ICompression.
|
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.
|
virtual |
Create a new empty archive in memory.
| initial_allocation_size | Estimated size of the archive, if known. Bigger size allow to avoid extra memory reallocations. |
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().
|
virtual |
Create a new empty archive.
Reimplemented in CArchiveCompressionFileStream, and CArchiveMemory.
Definition at line 319 of file archive.cpp.
References ARCHIVE_CHECK, CArchive::eCreate, and CArchive::x_Open().
|
virtual |
Create a new empty archive.
Reimplemented from CArchive.
Definition at line 1164 of file archive.cpp.
|
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().
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().
|
inline |
Create a new empty archive.
If a file with such a name already exists it will be overwritten.
Definition at line 808 of file tar.hpp.
References CTar::eCreate, and CTar::x_Open().
Create new archive file.
| filename | File name of the archive to create. |
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.
Create new archive file.
| filename | File name of the archive to create. |
Implemented in CArchiveZip.
|
virtual |
Create new archive file on top of a FILE stream.
| filestream | File stream that can be used for archive operations. |
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.
|
pure virtual |
Create new archive file on top of a FILE stream.
| filestream | File stream that can be used for archive operations. |
Implemented in CArchiveZip.
|
virtual |
Create new archive located in memory.
| initial_allocation_size | Estimated size of the archive, if known. Bigger size allow to avoid extra memory reallocations. |
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.
|
pure virtual |
Create new archive located in memory.
| initial_allocation_size | Estimated size of the archive, if known. Bigger size allow to avoid extra memory reallocations. |
Implemented in CArchiveZip.
| 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().
Constructors.
Definition at line 1308 of file tar.cpp.
References CTar::x_Init().
Referenced by CTar::Extract().
|
inlineprotected |
Definition at line 243 of file tar.hpp.
References CTarEntryInfo::m_Stat.
Definition at line 269 of file tar.hpp.
References CTarEntryInfo::m_Name, CTarEntryInfo::m_Stat, CDirEntry::SStat::orig, and ncbi::grid::netcache::search::fields::size.
|
private |
Private copy constructor to prohibit copy.
| CZipCloudflareCompression::CZipCloudflareCompression | ( | ELevel | level = eLevel_Default | ) |
Constructor.
|
private |
Private copy constructor to prohibit copy.
| 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.
| CZipCloudflareCompressionFile::CZipCloudflareCompressionFile | ( | ELevel | level = eLevel_Default | ) |
Conventional constructor.
| CZipCloudflareCompressor::CZipCloudflareCompressor | ( | ELevel | level = eLevel_Default, |
| TZipFlags | flags = 0 |
||
| ) |
Constructor.
| CZipCloudflareDecompressor::CZipCloudflareDecompressor | ( | TZipFlags | flags = 0 | ) |
Constructor.
|
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.
|
inline |
Full constructor.
Definition at line 760 of file zlib_cloudflare.hpp.
|
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.
|
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.
|
inline |
Full constructor.
Definition at line 814 of file zlib_cloudflare.hpp.
|
private |
Private copy constructor to prohibit copy.
| CZipCompression::CZipCompression | ( | ELevel | level = eLevel_Default | ) |
Constructor.
|
private |
Private copy constructor to prohibit copy.
| 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.
| CZipCompressionFile::CZipCompressionFile | ( | ELevel | level = eLevel_Default | ) |
Conventional constructor.
| CZipCompressor::CZipCompressor | ( | ELevel | level = eLevel_Default, |
| TZipFlags | flags = 0 |
||
| ) |
Constructor.
| CZipDecompressor::CZipDecompressor | ( | TZipFlags | flags = 0 | ) |
Constructor.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
Decompress block of data.
Definition at line 413 of file lzo.cpp.
References F_ISSET, CLZOCompression::fChecksum, flags, CLZOCompression::GetLZOErrorDescription(), CCompressionUtil::GetUI4(), n, NULL, and CCompression::SetError().
Referenced by CLZOCompression::DecompressBlockStream(), CLZOCompression::DecompressBuffer(), and CLZODecompressor::DecompressCache().
|
protected |
Decompress block of data for stream format (fStreamFormat flag).
Definition at line 454 of file lzo.cpp.
References CLZOCompression::DecompressBlock(), flags, CCompressionUtil::GetUI4(), and CCompression::SetError().
Referenced by CLZOCompression::DecompressBuffer().
|
virtual |
Decompress data in the buffer.
| src_buf | Source buffer. |
| src_len | Size of data in source buffer. |
| dst_buf | Destination buffer. |
| dst_size | Size of destination buffer. It must be large enough to hold all of the uncompressed data for the operation to complete. |
| dst_len | Size of decompressed data in destination buffer. |
Implements ICompression.
Referenced by CT_DecompressBuffer().
|
virtual |
Decompress data in the buffer.
| src_buf | Source buffer. |
| src_len | Size of data in source buffer. |
| dst_buf | Destination buffer. |
| dst_size | Size of destination buffer. It must be large enough to hold all of the uncompressed data for the operation to complete. |
| dst_len | Size of decompressed data in destination buffer. |
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().
|
virtual |
Decompress data in the buffer.
| src_buf | Source buffer. |
| src_len | Size of data in source buffer. |
| dst_buf | Destination buffer. It must be large enough to hold all of the uncompressed data for the operation to complete. |
| dst_size | Size of destination buffer. |
| dst_len | Size of decompressed data in destination buffer. |
Implements ICompression.
Referenced by CT_DecompressBuffer(), and CResultZBtSrcX::ReadLength().
|
virtual |
Decompress data in the buffer.
| src_buf | Source buffer. |
| src_len | Size of data in source buffer. |
| dst_buf | Destination buffer. It must be large enough to hold all of the uncompressed data for the operation to complete. |
| dst_size | Size of destination buffer. |
| dst_len | Size of decompressed data in destination buffer. |
Implements ICompression.
|
pure virtual |
Implemented in CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.
Referenced by CBDB_File::ReadCursor(), and CBDB_RawFile::x_FetchBufferDecompress().
|
protected |
Decompress block of data in the cache buffer.
Definition at line 1614 of file lzo.cpp.
References CLZOCompression::DecompressBlock(), ERR_COMPRESS, CLZOCompression::FormatErrorMessage(), CLZODecompressor::m_BlockLen, CLZODecompressor::m_HeaderFlags, CLZOBuffer::m_InBuf, CLZOBuffer::m_InLen, CLZOBuffer::m_OutBegPtr, CLZOBuffer::m_OutBuf, CLZOBuffer::m_OutEndPtr, CLZOBuffer::m_OutSize, and memmove.
Referenced by CLZODecompressor::Finish(), and CLZODecompressor::Process().
|
pure virtual |
Implemented in CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.
|
virtual |
Decompress file.
| src_file | File name of source file. |
| dst_file | File name of result file. |
| file_io_bufsize | Size of the buffer used to read from a source file. Writing happens immediately on receiving some data from a decompressor. |
| decompression_in_bufsize | Size 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_bufsize | Size of the internal buffer to receive data from a decompressor. |
Implements ICompression.
|
virtual |
Decompress file.
| src_file | File name of source file. |
| dst_file | File name of result file. |
| file_io_bufsize | Size of the buffer used to read from a source file. Writing happens immediately on receiving some data from a decompressor. |
| decompression_in_bufsize | Size 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_bufsize | Size of the internal buffer to receive data from a decompressor. |
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().
|
virtual |
Decompress file.
| src_file | File name of source file. |
| dst_file | File name of result file. |
| file_io_bufsize | Size of the buffer used to read from a source file. Writing happens immediately on receiving some data from a decompressor. |
| decompression_in_bufsize | Size 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_bufsize | Size of the internal buffer to receive data from a decompressor. |
Implements ICompression.
|
virtual |
Decompress file.
| src_file | File name of source file. |
| dst_file | File name of result file. |
| file_io_bufsize | Size of the buffer used to read from a source file. Writing happens immediately on receiving some data from a decompressor. |
| decompression_in_bufsize | Size 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_bufsize | Size of the internal buffer to receive data from a decompressor. |
Implements ICompression.
|
virtual |
Decompress file into specified directory.
| src_file | File name of source file. |
| dst_dir | Destination directory. |
| file_io_bufsize | Size of the buffer used to read from a source file. Writing happens immediately on receiving some data from a decompressor. |
| decompression_in_bufsize | Size 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_bufsize | Size of the internal buffer to receive data from a decompressor. |
|
virtual |
Decompress file into specified directory.
| src_file | File name of source file. |
| dst_dir | Destination directory. |
| file_io_bufsize | Size of the buffer used to read from a source file. Writing happens immediately on receiving some data from a decompressor. |
| decompression_in_bufsize | Size 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_bufsize | Size of the internal buffer to receive data from a decompressor. |
Free all dynamically allocated data structures.
This function discards any unprocessed input and does not flush any pending output.
| abandon | If 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.
Free all dynamically allocated data structures.
This function discards any unprocessed input and does not flush any pending output.
| abandon | If 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.
|
protectedvirtual |
Free all dynamically allocated data structures.
This function discards any unprocessed input and does not flush any pending output.
| abandon | If 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().
|
protectedvirtual |
Free all dynamically allocated data structures.
This function discards any unprocessed input and does not flush any pending output.
| abandon | If 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().
Free all dynamically allocated data structures.
This function discards any unprocessed input and does not flush any pending output.
| abandon | If 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.
Free all dynamically allocated data structures.
This function discards any unprocessed input and does not flush any pending output.
| abandon | If 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.
Free all dynamically allocated data structures.
This function discards any unprocessed input and does not flush any pending output.
| abandon | If 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.
Free all dynamically allocated data structures.
This function discards any unprocessed input and does not flush any pending output.
| abandon | If 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.
Free all dynamically allocated data structures.
This function discards any unprocessed input and does not flush any pending output.
| abandon | If 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().
|
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.
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.
|
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.
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().
|
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'.
| src_len | Size of data in source buffer. |
Implements ICompression.
|
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'.
| src_len | Size of data in source buffer. |
Implements ICompression.
|
pure virtual |
Estimate buffer size for data compression (if supported).
Implemented in CBZip2Compression, CZipCloudflareCompression, CZipCompression, and CLZOCompression.
|
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'.
| src_len | Size 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. |
Definition at line 682 of file lzo.cpp.
References ESTIMATE, CLZOCompression::fChecksum, flags, CLZOCompression::fStreamFormat, CLZOCompression::GetBlockSizeDefault(), kMaxHeaderSize, n, and SIZEOF_VOIDP.
|
inlinevirtual |
|
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.
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.
|
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().
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().
| 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.
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().
Definition at line 532 of file archive.cpp.
References ARCHIVE, ARCHIVE_THROW1, CDirEntry::eBlockSpecial, CDirEntry::eCharSpecial, CDirEntry::eDir, CDirEntry::eFile, CDirEntry::eLink, CDirEntry::ePipe, CDirEntry::GetPath(), CArchiveEntryInfo::GetType(), and CArchive::m_Current.
Referenced by CArchive::x_ExtractEntry().
|
virtual |
Extracts an archive file using user-defined callback to process extracted data.
Do nothing for entries of other types.
| info | Entry to extract. |
| callback | User callback for processing extracted data on the fly. |
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.
|
pure virtual |
Extracts an archive file using user-defined callback to process extracted data.
Do nothing for entries of other types.
| info | Entry to extract. |
| callback | User callback for processing extracted data on the fly. |
Implemented in CArchiveZip.
|
virtual |
Extracts an archive entry to file system.
| info | Entry to extract. |
| dst_path | Destination path for extracted entry. |
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.
|
pure virtual |
Extracts an archive entry to file system.
| info | Entry to extract. |
| dst_path | Destination path for extracted entry. |
Implemented in CArchiveZip.
|
virtual |
Extracts an archive file to a memory buffer.
Do nothing for entries of other types.
| info | Entry to extract. |
| buf | Memory buffer for extracted data. |
| size | Size of memory buffer. Note, that the buffer size should be big enough to fit whole extracted file. |
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.
|
pure virtual |
Extracts an archive file to a memory buffer.
Do nothing for entries of other types.
| info | Entry to extract. |
| buf | Memory buffer for extracted data. |
| size | Size of memory buffer. Note, that the buffer size should be big enough to fit whole extracted file. |
Implemented in CArchiveZip.
|
virtual |
Extract single file entry using user-defined callback.
| info | [in] Entry to extract. |
| callback | [in] User callback for processing extracted data on the fly. |
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().
|
virtual |
Extract single file entry to a dynamically allocated memory buffer.
| 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. |
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.
|
virtual |
Extract single file entry to a memory buffer.
| 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. |
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().
|
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).
| buf_ptr | Pointer to an archive located in memory. |
| buf_size_ptr | Size of the newly created archive. |
Definition at line 1194 of file archive.cpp.
References ARCHIVE, ARCHIVE_CHECK, CArchiveMemory::m_Buf, CArchiveMemory::m_BufSize, and NCBI_THROW.
|
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().
| buf | Pointer to an archive located in memory. |
| size | Size of the newly created archive. |
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.
|
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().
| buf | Pointer to an archive located in memory. |
| size | Size of the newly created archive. |
Implemented in CArchiveZip.
|
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.
|
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.
|
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.
Definition at line 1236 of file lzo.cpp.
References _VERIFY, CLZOCompressor::CompressCache(), ERR_COMPRESS, CCompressionProcessor::eStatus_EndOfData, CCompressionProcessor::eStatus_Error, CCompressionProcessor::eStatus_Overflow, CCompressionProcessor::eStatus_Success, F_ISSET, CLZOCompression::fAllowEmptyData, CLZOCompressor::Flush(), CLZOCompression::FormatErrorMessage(), CCompression::GetFlags(), CCompressionProcessor::GetProcessedSize(), CLZOCompression::m_BlockSize, CLZOCompressor::m_FileInfo, CLZOBuffer::m_InLen, CLZOCompressor::m_NeedWriteHeader, CLZOBuffer::m_OutBegPtr, CLZOBuffer::m_OutEndPtr, CLZOBuffer::m_OutSize, s_WriteLZOHeader(), CCompression::SetError(), and CCompressionUtil::StoreUI4().
|
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.
Definition at line 1546 of file lzo.cpp.
References CLZODecompressor::DecompressCache(), CCompression::eMode_Unknown, ERR_COMPRESS, CCompressionProcessor::eStatus_EndOfData, CCompressionProcessor::eStatus_Error, CCompressionProcessor::eStatus_Overflow, CCompressionProcessor::eStatus_Success, F_ISSET, CLZOCompression::fAllowEmptyData, CLZODecompressor::Flush(), CLZOCompression::FormatErrorMessage(), kMinHeaderSize, CLZODecompressor::m_BlockLen, CLZODecompressor::m_Cache, CCompression::m_DecompressMode, CLZODecompressor::m_HeaderLen, CLZOBuffer::m_InLen, CLZOBuffer::m_OutBegPtr, CLZOBuffer::m_OutEndPtr, CLZODecompressor::Process(), and CCompression::SetError().
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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().
|
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().
|
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.
|
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.
|
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.
|
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.
|
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().
Format string with last error description.
Definition at line 823 of file lzo.cpp.
References CCompression::GetErrorDescription(), and str().
Referenced by CLZOCompression::CompressBuffer(), CLZOCompressor::CompressCache(), CLZOCompression::DecompressBuffer(), CLZODecompressor::DecompressCache(), CLZOCompressor::Finish(), CLZODecompressor::Finish(), CLZOCompressor::Process(), and CLZODecompressor::Process().
|
protected |
Format string with last error description.
Format string with last error description.
If pos == 0, that use internal m_Stream's position to report.
|
protected |
Format string with last error description.
If pos == 0, that use internal m_Stream's position to report.
| void CCompressionDictionary::Free | ( | void | ) |
Free used memory.
Definition at line 376 of file compress.cpp.
References eTakeOwnership, free(), CCompressionDictionary::m_Data, CCompressionDictionary::m_Own, CCompressionDictionary::m_Size, and NULL.
Referenced by CCompressionDictionary::~CCompressionDictionary().
| 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.
| is | Opened input stream to scan (should be opened in binary mode). |
| handler | Call handler's IChunkHandler::OnChunk() method and pass position of each new gzip file inside a stream and size of uncompressed data on that moment. |
| 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.
| is | Opened input stream to scan (should be opened in binary mode). |
| handler | Call handler's IChunkHandler::OnChunk() method and pass position of each new gzip file inside a stream and size of uncompressed data on that moment. |
Referenced by CLDS2_UrlHandler_GZipFile::SaveChunks().
Get base directory to use for files while extracting from/adding to the archive, and in the latter case used only for relative paths.
Definition at line 299 of file archive.hpp.
References CArchive::m_BaseDir.
Get base directory to use for files while extracting from/adding to the archive, and in the latter case used only for relative paths.
Definition at line 873 of file tar.hpp.
References CTar::m_BaseDir.
|
inline |
Definition at line 405 of file lzo.hpp.
References CLZOCompression::m_BlockSize.
Referenced by CLZOCompression::CompressFile(), CLZOCompression::DecompressFile(), and CLZOCompressionFile::Open().
|
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.
Definition at line 850 of file lzo.cpp.
Referenced by CLZOCompression::CLZOCompression(), and CLZOCompression::EstimateCompressionBufferSize().
|
static |
|
static |
Get error description for specified error code.
Definition at line 140 of file archive_.hpp.
References CArchiveEntryInfo::m_Comment.
|
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().
|
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().
|
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 >().
|
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().
|
inline |
Definition at line 207 of file tar.hpp.
References CDirEntry::SStat::ctime_nsec, CTarEntryInfo::m_Stat, CDirEntry::SStat::orig, and CTime::SetNanoSecond().
|
inline |
Definition at line 144 of file archive_.hpp.
References CArchiveEntryInfo::m_Stat.
|
inline |
Definition at line 205 of file tar.hpp.
References CTarEntryInfo::m_Stat, and CDirEntry::SStat::orig.
|
inline |
|
inline |
Return pointer to the dictionary data.
Definition at line 437 of file compress.hpp.
References CCompressionDictionary::m_Data.
|
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().
|
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().
|
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 >().
|
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().
|
inlinevirtual |
Return default compression level for a compression algorithm.
Implements ICompression.
Definition at line 92 of file bzip2.hpp.
References ICompression::eLevel_VeryHigh.
|
inlinevirtual |
Returns default compression level for a compression algorithm.
Implements ICompression.
Definition at line 186 of file lzo.hpp.
References ICompression::eLevel_Lowest.
|
inlinevirtual |
Returns default compression level for a compression algorithm.
Implements ICompression.
Definition at line 141 of file zlib.hpp.
References ICompression::eLevel_Default.
|
inlinevirtual |
Returns default compression level for a compression algorithm.
Implements ICompression.
Definition at line 135 of file zlib_cloudflare.hpp.
References ICompression::eLevel_Default.
|
pure virtual |
Return the default compression level for current compression algorithm.
Implemented in CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.
Referenced by CCompression::GetLevel().
|
virtual |
Get detailed information about an archive entry by index.
| index | Zero-based index of entry in the archive. |
| info | Pointer to entry information structure that will be filled with information about entry with specified index. |
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.
|
pure virtual |
Get detailed information about an archive entry by index.
| index | Zero-based index of entry in the archive. |
| info | Pointer to entry information structure that will be filled with information about entry with specified index. |
Implemented in CArchiveZip.
|
inlineoverridevirtual |
Translate from an error code value to its string representation.
Reimplemented from CCoreException.
Definition at line 81 of file archive_.hpp.
References CArchiveException::eAppend, CArchiveException::eBackup, CArchiveException::eBadName, CArchiveException::eClose, CArchiveException::eCreate, CArchiveException::eExtract, CArchiveException::eList, CArchiveException::eMemory, CArchiveException::eOpen, CArchiveException::eRestoreAttrs, CArchiveException::eUnsupported, CArchiveException::eUnsupportedEntryType, CArchiveException::eWrite, CCoreException::GetErrCode(), and CException::GetErrCodeString().
|
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().
|
inlineoverridevirtual |
Translate from an error code value to its string representation.
Reimplemented from CCoreException.
Definition at line 127 of file tar.hpp.
References CTarException::eBackup, CTarException::eBadName, CTarException::eChecksum, CTarException::eCreate, CTarException::eMemory, CTarException::eNameTooLong, CTarException::eOpen, CTarException::eRead, CTarException::eRestoreAttrs, CTarException::eUnsupportedEntryType, CTarException::eUnsupportedSource, CTarException::eUnsupportedTarFormat, CTarException::eWrite, CCoreException::GetErrCode(), and CException::GetErrCodeString().
|
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().
|
pure virtual |
Implemented in CCompression.
|
virtual |
Implements ICompression.
Definition at line 85 of file compress.cpp.
References CCompression::m_ErrorMsg.
Referenced by CLZOCompression::CompressFile(), CLZOCompression::DecompressFile(), and CLZOCompression::FormatErrorMessage().
|
pure virtual |
Implemented in CCompression.
Referenced by CBDB_File::ReadCursor(), and CBDB_RawFile::x_FetchBufferDecompress().
|
inlinevirtual |
|
virtual |
Get/set flags.
Implements ICompression.
Definition at line 105 of file compress.cpp.
References CCompression::m_Flags.
Referenced by CBZip2Compressor::AllowEmptyData(), CBZip2Decompressor::AllowEmptyData(), CLZOCompressor::AllowEmptyData(), CLZODecompressor::AllowEmptyData(), CZipCompressor::AllowEmptyData(), CZipDecompressor::AllowEmptyData(), CZipCloudflareCompressor::AllowEmptyData(), CZipCloudflareDecompressor::AllowEmptyData(), CLZOCompression::CompressBuffer(), CLZOCompression::CompressFile(), CResultZBtSrcX::CResultZBtSrcX(), CT_CompressBuffer(), CT_DecompressBuffer(), CLZOCompression::DecompressBuffer(), CLZOCompression::DecompressFile(), CLZOCompression::EstimateCompressionBufferSize(), CLZOCompressor::Finish(), CLZOCompressionFile::Open(), and CLZOCompressor::Process().
|
inline |
|
pure virtual |
Implemented in CCompression.
|
inline |
Definition at line 154 of file archive_.hpp.
References CArchiveEntryInfo::m_Stat.
|
inline |
Definition at line 222 of file tar.hpp.
References CTarEntryInfo::m_Stat, and CDirEntry::SStat::orig.
Referenced by CTar::x_WriteEntryInfo().
Definition at line 139 of file archive_.hpp.
References CArchiveEntryInfo::m_GroupName.
Referenced by CArchive::x_Append().
Definition at line 192 of file tar.hpp.
References CTarEntryInfo::m_GroupName.
Referenced by CTar::x_Append(), CTar::x_ReadAndProcess(), and CTar::x_WriteEntryInfo().
|
inline |
Definition at line 141 of file archive_.hpp.
References CArchiveEntryInfo::m_Index.
|
inline |
Definition at line 201 of file tar.hpp.
References CDirEntry::SStat::atime_nsec, CTarEntryInfo::m_Stat, CDirEntry::SStat::orig, and CTime::SetNanoSecond().
|
inline |
Definition at line 143 of file archive_.hpp.
References CArchiveEntryInfo::m_Stat.
|
inline |
Definition at line 199 of file tar.hpp.
References CTarEntryInfo::m_Stat, and CDirEntry::SStat::orig.
|
virtual |
Get compression level.
Reimplemented from CCompression.
|
virtual |
Implements ICompression.
Reimplemented in CLZOCompression, and CBZip2Compression.
Definition at line 64 of file compress.cpp.
References ICompression::eLevel_Default, ICompression::GetDefaultLevel(), and CCompression::m_Level.
Referenced by CLZOCompression::GetLevel().
|
virtual |
Get compression level.
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().
|
pure virtual |
Implemented in CLZOCompression, CCompression, and CBZip2Compression.
Definition at line 137 of file archive_.hpp.
References CArchiveEntryInfo::m_LinkName.
Referenced by CArchive::x_Append().
Definition at line 190 of file tar.hpp.
References CTarEntryInfo::m_LinkName.
Referenced by CTar::x_Append(), CTar::x_ExtractEntry(), CTar::x_PackCurrentName(), CTar::x_ProcessEntry(), CTar::x_ReadAndProcess(), and CTar::x_WriteEntryInfo().
Get error description for specified error code.
Definition at line 801 of file lzo.cpp.
Referenced by CLZOCompression::CompressBlock(), CLZOCompression::CompressBuffer(), and CLZOCompression::DecompressBlock().
| unsigned int CArchiveEntryInfo::GetMajor | ( | void | ) | const |
Definition at line 91 of file archive_.cpp.
References CDirEntry::eBlockSpecial, CDirEntry::eCharSpecial, CArchiveEntryInfo::m_Stat, and CArchiveEntryInfo::m_Type.
| unsigned int CTarEntryInfo::GetMajor | ( | void | ) | const |
Definition at line 479 of file tar.cpp.
References CTarEntryInfo::eBlockDev, CTarEntryInfo::eCharDev, CTarEntryInfo::m_Stat, CTarEntryInfo::m_Type, and CDirEntry::SStat::orig.
Referenced by CTar::x_WriteEntryInfo().
|
inline |
Definition at line 457 of file zlib.hpp.
References CZipCompression::m_c_MemLevel.
|
inline |
Definition at line 451 of file zlib_cloudflare.hpp.
References CZipCloudflareCompression::m_c_MemLevel.
Referenced by CZipCompression::SetMemoryLevel().
Referenced by CZipCloudflareCompression::SetMemoryLevel().
| unsigned int CArchiveEntryInfo::GetMinor | ( | void | ) | const |
Definition at line 107 of file archive_.cpp.
References CDirEntry::eBlockSpecial, CDirEntry::eCharSpecial, CArchiveEntryInfo::m_Stat, and CArchiveEntryInfo::m_Type.
| unsigned int CTarEntryInfo::GetMinor | ( | void | ) | const |
Definition at line 494 of file tar.cpp.
References CTarEntryInfo::eBlockDev, CTarEntryInfo::eCharDev, CTarEntryInfo::m_Stat, CTarEntryInfo::m_Type, and CDirEntry::SStat::orig.
Referenced by CTar::x_WriteEntryInfo().
| 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().
| 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().
| mode_t CArchiveEntryInfo::GetMode | ( | void | ) | const |
Definition at line 75 of file archive_.cpp.
References CArchiveEntryInfo::m_Stat.
Referenced by CArchiveEntryInfo::GetMode().
| TTarMode CTarEntryInfo::GetMode | ( | void | ) | const |
Definition at line 463 of file tar.cpp.
References CTarEntryInfo::m_Stat, and CDirEntry::SStat::orig.
Referenced by CTarEntryInfo::GetMode(), CTar::x_ExtractEntry(), and CTar::x_WriteEntryInfo().
|
inline |
Definition at line 195 of file tar.hpp.
References CTarEntryInfo::m_Stat, CDirEntry::SStat::mtime_nsec, CDirEntry::SStat::orig, and CTime::SetNanoSecond().
Referenced by CTar::x_Append(), and CTar::x_ProcessEntry().
|
inline |
Definition at line 142 of file archive_.hpp.
References CArchiveEntryInfo::m_Stat.
Referenced by CArchive::x_Append(), and CArchive::x_ExtractEntry().
|
inline |
Definition at line 193 of file tar.hpp.
References CTarEntryInfo::m_Stat, and CDirEntry::SStat::orig.
Referenced by CTar::x_WriteEntryInfo().
Definition at line 136 of file archive_.hpp.
References CArchiveEntryInfo::m_Name.
Referenced by CArchive::x_ExtractEntry().
Definition at line 189 of file tar.hpp.
References CTarEntryInfo::m_Name.
Referenced by CTar::x_Append(), CTar::x_ExtractEntry(), CTar::x_ExtractSparseFile(), CTar::x_PackCurrentName(), CTar::x_ProcessEntry(), CTar::x_ReadAndProcess(), CTar::x_ReadEntryInfo(), and CTar::x_WriteEntryInfo().
| 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.
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.
| 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.
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().
|
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.
|
pure virtual |
Returns the total number of entries in the archive.
Implemented in CArchiveZip.
|
inline |
Definition at line 716 of file compress.hpp.
Referenced by CCompressionStream::x_GetOutputSize().
Definition at line 228 of file tar.hpp.
References CTarEntryInfo::m_Path.
Definition at line 224 of file tar.hpp.
References CTarEntryInfo::ePos_Header, CTarEntryInfo::m_HeaderSize, and CTarEntryInfo::m_Pos.
Referenced by CTar::GetNextEntryInfo().
|
inline |
Definition at line 710 of file compress.hpp.
Referenced by CLZOCompressor::Finish(), and CCompressionStream::x_GetProcessedSize().
|
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.
| round_up | If 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. |
|
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.
| round_up_by | If 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. |
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().
|
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.
| round_up_by | If 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. |
|
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.
| round_up_by | If 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. |
|
inline |
Return dictionary data size.
Definition at line 440 of file compress.hpp.
References CCompressionDictionary::m_Size.
|
inline |
Definition at line 145 of file archive_.hpp.
References CArchiveEntryInfo::m_Stat.
|
inline |
Definition at line 211 of file tar.hpp.
References CTarEntryInfo::m_Stat, and CDirEntry::SStat::orig.
Referenced by CTarCheckpointed::Checkpoint(), CTar::GetNextEntryInfo(), CTarReader::PendingCount(), CTarReader::Read(), CTar::x_AppendStream(), CTar::x_ReadAndProcess(), CTar::x_ReadEntryInfo(), and CTar::x_WriteEntryInfo().
|
inline |
Definition at line 287 of file bzip2.hpp.
References CBZip2Compression::m_d_SmallDecompress.
|
inline |
Definition at line 441 of file zlib.hpp.
References CZipCompression::m_c_Strategy.
|
inline |
Definition at line 435 of file zlib_cloudflare.hpp.
References CZipCloudflareCompression::m_c_Strategy.
Referenced by CZipCompression::SetStrategy().
Referenced by CZipCloudflareCompression::SetStrategy().
|
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().
|
protected |
Get error code/description of last stream operation (m_Stream).
It can be received using GetErrorCode()/GetErrorDescription() methods.
|
protected |
Get error code/description of last stream operation (m_Stream).
It can be received using GetErrorCode()/GetErrorDescription() methods.
|
inline |
Definition at line 135 of file archive_.hpp.
References CArchiveEntryInfo::m_Type.
Referenced by CArchive::ExtractEntry(), CArchive::TestEntry(), CArchive::x_Append(), and CArchive::x_ExtractEntry().
|
inline |
Definition at line 188 of file tar.hpp.
References CTarEntryInfo::m_Type.
Referenced by CTar::GetNextEntryData(), CTar::x_Append(), CTar::x_AppendFile(), CTar::x_AppendStream(), CTar::x_ExtractEntry(), CTar::x_ProcessEntry(), CTar::x_ReadAndProcess(), CTar::x_ReadEntryInfo(), and CTar::x_WriteEntryInfo().
Read 2 bytes from buffer.
Definition at line 267 of file compress.cpp.
References buf, buffer, and NCBI_THROW.
Referenced by s_CheckLZOHeader().
Read 4 bytes from buffer.
Definition at line 238 of file compress.cpp.
References buf, buffer, i, NCBI_THROW, and rapidjson::value.
Referenced by CLZOCompression::DecompressBlock(), CLZOCompression::DecompressBlockStream(), CLZODecompressor::Process(), and s_CheckLZOHeader().
|
inline |
Definition at line 153 of file archive_.hpp.
References CArchiveEntryInfo::m_Stat.
|
inline |
Definition at line 220 of file tar.hpp.
References CTarEntryInfo::m_Stat, and CDirEntry::SStat::orig.
Referenced by CTar::x_WriteEntryInfo().
Definition at line 138 of file archive_.hpp.
References CArchiveEntryInfo::m_UserName.
Referenced by CArchive::x_Append().
Definition at line 191 of file tar.hpp.
References CTarEntryInfo::m_UserName.
Referenced by CTar::x_Append(), CTar::x_ReadAndProcess(), and CTar::x_WriteEntryInfo().
|
virtual |
Return name and version of the compression library.
Implements CCompression.
|
virtual |
Return name and version of the compression library.
Implements CCompression.
|
virtual |
Return name and version of the compression library.
Implements CCompression.
|
virtual |
Return name and version of the compression library.
Implements CCompression.
|
pure virtual |
Return name and version of the compression library.
Implemented in CCompression, CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.
|
pure virtual |
Return name and version of the compression library.
Implements ICompression.
Implemented in CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.
|
inline |
Definition at line 478 of file zlib.hpp.
References CZipCompression::m_cd_WindowBits.
|
inline |
Definition at line 472 of file zlib_cloudflare.hpp.
References CZipCloudflareCompression::m_cd_WindowBits.
Referenced by CZipCompression::SetWindowBits().
Referenced by CZipCloudflareCompression::SetWindowBits().
|
inline |
Definition at line 274 of file bzip2.hpp.
References CBZip2Compression::m_c_WorkFactor.
|
virtual |
Check if compression have support for a specified feature.
Implements ICompression.
|
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.
|
virtual |
Check if compression have support for a specified feature.
Implements ICompression.
|
virtual |
Check if compression have support for a specified feature.
Implements ICompression.
|
pure virtual |
Check if compression have support for a specified feature.
Implemented in CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.
| bool CArchive::HaveSupport | ( | ESupportFeature | feature, |
| int | param = 0 |
||
| ) |
Check that current archive format have support for specific features.
| feature | Name of the feature to check. |
| param | Additional parameter (for eType only). |
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().
|
inlinevirtual |
Implements IArchive.
Definition at line 187 of file archive_zip.hpp.
|
pure virtual |
Implemented in CArchiveZip.
|
inlinevirtual |
Implements IArchive.
Definition at line 188 of file archive_zip.hpp.
|
pure virtual |
Implemented in CArchiveZip.
|
virtual |
Check that current archive format have support for specific feature.
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.
|
pure virtual |
Check that current archive format have support for specific feature.
Implemented in CArchiveZip.
|
inlineprotected |
Definition at line 704 of file compress.hpp.
Referenced by CLZOCompressor::Flush(), CLZODecompressor::Flush(), CLZODecompressor::Process(), and CTransparentProcessor::Process().
|
inlineprotected |
Definition at line 698 of file compress.hpp.
Referenced by CLZOCompressor::Process(), CLZODecompressor::Process(), and CTransparentProcessor::Process().
|
protectedvirtual |
Initialize the internal stream state for compression/decompression.
It does not perform any compression, this will be done by Process().
Implements CCompressionProcessor.
|
protectedvirtual |
Initialize the internal stream state for compression/decompression.
It does not perform any compression, this will be done by Process().
Implements CCompressionProcessor.
|
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 1133 of file lzo.cpp.
References CCompression::eMode_Unknown, CCompressionProcessor::eStatus_Success, CLZOCompression::EstimateCompressionBufferSize(), CLZOCompression::GetLevel(), CLZOCompression::InitCompression(), CLZOCompression::m_BlockSize, CCompression::m_DecompressMode, CLZOCompressor::m_NeedWriteHeader, CCompressionProcessor::Reset(), CLZOBuffer::ResetBuffer(), CCompressionProcessor::SetBusy(), and CCompression::SetError().
|
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().
|
protectedvirtual |
Initialize the internal stream state for compression/decompression.
It does not perform any compression, this will be done by Process().
Implements CCompressionProcessor.
|
protectedvirtual |
Initialize the internal stream state for compression/decompression.
It does not perform any compression, this will be done by Process().
Implements CCompressionProcessor.
|
protectedvirtual |
Initialize the internal stream state for compression/decompression.
It does not perform any compression, this will be done by Process().
Implements CCompressionProcessor.
|
protectedvirtual |
Initialize the internal stream state for compression/decompression.
It does not perform any compression, this will be done by Process().
Implements CCompressionProcessor.
|
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().
|
protected |
Initialize compression parameters.
Definition at line 177 of file lzo.cpp.
References SCompressionParam::compress, ICompression::eLevel_Best, CLZOCompression::m_Param, CLZOCompression::m_WorkMem, AutoArray< X, Del >::reset(), and SCompressionParam::workmem.
Referenced by CLZOCompression::CompressBuffer(), and CLZOCompressor::Init().
|
static |
Initialize LZO library.
You should call this method only once, before any real compression/decompression operations.
Initialize compression library (for API compatibility, zlib don't need it).
Definition at line 78 of file zlib_cloudflare.hpp.
|
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().
|
virtual |
Get information about archive entries.
Definition at line 326 of file archive.cpp.
References ARCHIVE_CHECK, CArchive::eList, CArchive::x_Open(), and CArchive::x_ReadAndProcess().
|
inline |
Get information about all matching archive entries.
Definition at line 842 of file tar.hpp.
References CTar::eList, CTar::x_Open(), and CTar::x_ReadAndProcess().
Load existing archive from file system to memory.
| filename | Path to the existing archive. |
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.
|
protected |
Definition at line 341 of file compress.cpp.
References eTakeOwnership, CCompressionDictionary::m_Data, CCompressionDictionary::m_Own, max(), n, ncbi::grid::netcache::search::fields::size, and string.
Referenced by CCompressionDictionary::CCompressionDictionary().
| CArchiveException::NCBI_EXCEPTION_DEFAULT | ( | CArchiveException | , |
| CCoreException | |||
| ) |
| CCompressionException::NCBI_EXCEPTION_DEFAULT | ( | CCompressionException | , |
| CCoreException | |||
| ) |
| CTarException::NCBI_EXCEPTION_DEFAULT | ( | CTarException | , |
| CCoreException | |||
| ) |
Callback method, to be implemented by the end user.
| raw_pos | Position of the chunk in the "raw" (undecoded) stream. |
| data_pos | Position of the chunk in the decoded stream data. |
Implemented in CGZipChunkHandler.
|
virtual |
Opens a compressed file for reading or writing.
Do the same as standard Open(), but can also get/set file info.
| file_name | File name of the file to open. |
| mode | File open mode. |
| info | Pointer 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_bufsize | Size of the internal buffer holding input data to be (de)compressed. |
| compression_out_bufsize | Size of the internal buffer to receive data from a (de)compressor. |
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.
|
virtual |
Opens a compressed file for reading or writing.
Do the same as standard Open(), but can also get/set file info.
| file_name | File name of the file to open. |
| mode | File open mode. |
| info | Pointer 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_bufsize | Size of the internal buffer holding input data to be (de)compressed. |
| compression_out_bufsize | Size of the internal buffer to receive data from a (de)compressor. |
|
virtual |
Opens a compressed file for reading or writing.
Do the same as standard Open(), but can also get/set file info.
| file_name | File name of the file to open. |
| mode | File open mode. |
| info | Pointer 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_bufsize | Size of the internal buffer holding input data to be (de)compressed. |
| compression_out_bufsize | Size of the internal buffer to receive data from a (de)compressor. |
|
virtual |
Opens a compressed file for reading or writing.
| file_name | File name of the file to open. |
| mode | File open mode. |
Implements CCompressionFile.
|
virtual |
Opens a compressed file for reading or writing.
| file_name | File name of the file to open. |
| mode | File open mode. |
| compression_in_bufsize | Size of the internal buffer holding input data to be (de)compressed. |
| compression_out_bufsize | Size of the internal buffer to receive data from a (de)compressor. |
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().
|
virtual |
Opens a compressed file for reading or writing.
| file_name | File name of the file to open. |
| mode | File open mode. |
| compression_in_bufsize | Size of the internal buffer holding input data to be (de)compressed. |
| compression_out_bufsize | Size of the internal buffer to receive data from a (de)compressor. |
Implements CCompressionFile.
|
virtual |
Opens a compressed file for reading or writing.
| file_name | File name of the file to open. |
| mode | File open mode. |
| compression_in_bufsize | Size of the internal buffer holding input data to be (de)compressed. |
| compression_out_bufsize | Size of the internal buffer to receive data from a (de)compressor. |
Implements CCompressionFile.
|
pure virtual |
Opens a compressed file for reading or writing.
Return NULL if error has been occurred.
Implemented in CZipCloudflareCompressionFile, CZipCompressionFile, CLZOCompressionFile, and CBZip2CompressionFile.
|
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.
|
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.
|
protectedvirtual |
Open the archive for specified action.
Implements CArchive.
Definition at line 1299 of file archive.cpp.
References _TROUBLE, ARCHIVE, ARCHIVE_CHECK, CArchive::eAppend, CArchive::eCreate, CArchive::eWO, CArchiveCompressionFileStream::m_FileStream, and CArchive::m_OpenMode.
Referenced by CArchiveCompressionFileStream::Create().
|
protectedpure virtual |
Open archive.
Implemented in CArchiveCompressionFileStream, CArchiveMemory, and CArchiveFile.
Referenced by CArchive::x_Open().
Open archive file for reading.
| filename | File name of the existing archive to open. |
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.
Open archive file for reading.
| filename | File name of the existing archive to open. |
Implemented in CArchiveZip.
|
virtual |
Open archive from a FILE stream, beginning at the current file position.
| filestream | File stream that can be used for archive operations. |
| archive_size | The 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. |
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.
|
pure virtual |
Open archive from a FILE stream, beginning at the current file position.
| filestream | File stream that can be used for archive operations. |
| archive_size | The 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. |
Implemented in CArchiveZip.
|
virtual |
Open archive located in memory for reading.
| buf | Pointer to an archive located in memory. Used only to open already existed archive for reading. |
| size | Size of the archive. |
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.
|
pure virtual |
Open archive located in memory for reading.
| buf | Pointer to an archive located in memory. Used only to open already existed archive for reading. |
| size | Size of the archive. |
Implemented in CArchiveZip.
| ostream& operator<< | ( | ostream & | os, |
| const CArchiveEntryInfo & | info | ||
| ) |
Nice TOC (table of contents) printout.
Definition at line 192 of file archive_.cpp.
References CDirEntry::eLink, CDirEntry::eModeFormat_List, info, CDirEntry::ModeFromModeT(), CDirEntry::ModeToString(), s_SizeOrMajorMinor(), s_TypeAsChar(), s_UserGroupAsString(), and t.
| ostream& operator<< | ( | ostream & | , |
| const CTarEntryInfo & | |||
| ) |
Nice TOC(table of contents) printout.
|
private |
|
private |
|
private |
|
private |
Private assignment operator to prohibit assignment.
|
private |
Private assignment operator to prohibit assignment.
|
private |
|
private |
Private assignment operator to prohibit assignment.
|
private |
Private assignment operator to prohibit assignment.
|
private |
Private assignment operator to prohibit assignment.
|
private |
|
private |
|
private |
Private assignment operator to prohibit assignment.
|
private |
Private assignment operator to prohibit assignment.
|
private |
Private assignment operator to prohibit assignment.
|
private |
Private assignment operator to prohibit assignment.
| bool CArchiveEntryInfo::operator== | ( | const CArchiveEntryInfo & | info | ) | const |
Definition at line 123 of file archive_.cpp.
References info, CArchiveEntryInfo::m_GroupName, CArchiveEntryInfo::m_Index, CArchiveEntryInfo::m_LinkName, CArchiveEntryInfo::m_Name, CArchiveEntryInfo::m_Stat, CArchiveEntryInfo::m_Type, and CArchiveEntryInfo::m_UserName.
|
inline |
Definition at line 231 of file tar.hpp.
References info, CTarEntryInfo::m_GroupName, CTarEntryInfo::m_HeaderSize, CTarEntryInfo::m_LinkName, CTarEntryInfo::m_Name, CTarEntryInfo::m_Pos, CTarEntryInfo::m_Stat, CTarEntryInfo::m_Type, and CTarEntryInfo::m_UserName.
|
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.
|
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.
|
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.
|
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.
Definition at line 1151 of file lzo.cpp.
References CLZOCompressor::CompressCache(), ERR_COMPRESS, CCompressionProcessor::eStatus_Error, CCompressionProcessor::eStatus_Overflow, CCompressionProcessor::eStatus_Success, CLZOCompressor::Flush(), CLZOCompression::FormatErrorMessage(), CCompression::GetFlags(), CCompressionProcessor::IncreaseProcessedSize(), CLZOCompression::m_BlockSize, CLZOCompressor::m_FileInfo, CLZOBuffer::m_InBuf, CLZOBuffer::m_InLen, CLZOBuffer::m_InSize, CLZOCompressor::m_NeedWriteHeader, CLZOBuffer::m_OutBegPtr, CLZOBuffer::m_OutEndPtr, CLZOBuffer::m_OutSize, min(), n, s_WriteLZOHeader(), and CCompression::SetError().
|
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.
Definition at line 1374 of file lzo.cpp.
References _VERIFY, CLZODecompressor::DecompressCache(), CCompression::eMode_Decompress, CCompression::eMode_TransparentRead, CCompression::eMode_Unknown, ERR_COMPRESS, CCompressionProcessor::eStatus_EndOfData, CCompressionProcessor::eStatus_Error, CCompressionProcessor::eStatus_Overflow, CCompressionProcessor::eStatus_Success, CLZOCompression::EstimateCompressionBufferSize(), F_ISSET, CLZOCompression::fAllowTransparentRead, CLZODecompressor::Flush(), CLZOCompression::FormatErrorMessage(), CCompressionUtil::GetUI4(), CCompressionProcessor::IncreaseOutputSize(), CCompressionProcessor::IncreaseProcessedSize(), kMaxHeaderSize, CLZODecompressor::m_BlockLen, CLZOCompression::m_BlockSize, CLZODecompressor::m_Cache, CCompression::m_DecompressMode, CLZODecompressor::m_HeaderFlags, CLZODecompressor::m_HeaderLen, CLZOBuffer::m_InBuf, CLZOBuffer::m_InLen, CLZOBuffer::m_InSize, CLZOBuffer::m_OutBegPtr, CLZOBuffer::m_OutEndPtr, memmove, min(), n, CLZOBuffer::ResetBuffer(), s_CheckLZOHeader(), and CCompression::SetError().
Referenced by CLZODecompressor::Finish().
|
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.
|
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.
|
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.
|
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.
|
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().
Reimplemented from CByteSourceReader.
Definition at line 253 of file reader_zlib.cpp.
References data, CNlmZipBtRdr::eType_plain, CNlmZipBtRdr::m_Src, CNlmZipBtRdr::m_Type, CByteSourceReader::Pushback(), and ncbi::grid::netcache::search::fields::size.
|
virtual |
Read up to bufferLength bytes into buffer return amount of bytes read (if zero - see EndOfData())
Implements CByteSourceReader.
Definition at line 212 of file reader_zlib.cpp.
References _TRACE, buffer, cnt, CNlmZipBtRdr::eType_plain, CNlmZipBtRdr::eType_unknown, CNlmZipBtRdr::eType_zlib, kHeaderSize, CNlmZipBtRdr::m_Decompressor, CNlmZipBtRdr::m_Src, CNlmZipBtRdr::m_Type, NCBI_THROW, need_more, and CByteSourceReader::Read().
|
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).
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().
|
virtual |
Read data from compressed file.
Read up to "len" uncompressed bytes from the compressed file "file" into the buffer "buf".
| buf | Buffer for requested data. |
| len | Number of bytes to read. |
Implements CCompressionFile.
|
virtual |
Read data from compressed file.
Read up to "len" uncompressed bytes from the compressed file "file" into the buffer "buf".
| buf | Buffer for requested data. |
| len | Number of bytes to read. |
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.
|
virtual |
Read data from compressed file.
Read up to "len" uncompressed bytes from the compressed file "file" into the buffer "buf".
| buf | Buffer for requested data. |
| len | Number of bytes to read. |
Implements CCompressionFile.
|
virtual |
Read data from compressed file.
Read up to "len" uncompressed bytes from the compressed file "file" into the buffer "buf".
| buf | Buffer for requested data. |
| len | Number of bytes to read. |
Implements CCompressionFile.
|
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().
|
inline |
Definition at line 123 of file archive_.hpp.
References CDirEntry::eUnknown, CArchiveEntryInfo::m_CompressedSize, CArchiveEntryInfo::m_Index, CArchiveEntryInfo::m_Stat, and CArchiveEntryInfo::m_Type.
Referenced by CArchiveEntryInfo::CArchiveEntryInfo(), and CArchive::x_ReadAndProcess().
|
inlineprotected |
Reset internal state.
Definition at line 674 of file compress.hpp.
Referenced by CCompressionProcessor::CCompressionProcessor(), CLZOCompressor::Init(), and CLZODecompressor::Init().
|
protected |
Reset internal state.
Definition at line 1085 of file lzo.cpp.
References _ASSERT, AutoArray< X, Del >::get(), CLZOBuffer::m_Buf, CLZOBuffer::m_InBuf, CLZOBuffer::m_InLen, CLZOBuffer::m_InSize, CLZOBuffer::m_OutBegPtr, CLZOBuffer::m_OutBuf, CLZOBuffer::m_OutEndPtr, CLZOBuffer::m_OutSize, and AutoArray< X, Del >::reset().
Referenced by CLZOCompressor::Init(), and CLZODecompressor::Process().
|
inline |
Definition at line 665 of file compress.hpp.
References precision, and rapidjson::value.
Referenced by CLZOCompression::GetRecommendedBufferSizes().
Save current opened/created archive to file.
| filename | Path 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. |
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().
Set base directory to use for files while extracting from/adding to the archive, and in the latter case used only for relative paths.
Definition at line 293 of file archive.cpp.
References CDirEntry::AddTrailingPathSeparator(), CArchive::m_BaseDir, and NStr::ReplaceInPlace().
Set base directory to use for files while extracting from/adding to the archive, and in the latter case used only for relative paths.
Definition at line 4603 of file tar.cpp.
References CTar::m_BaseDir, and s_BaseDir().
Referenced by CDownloadJob::x_DownloadAndExtract().
|
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().
Set/unset compressor busy flag.
Definition at line 688 of file compress.hpp.
References NCBI_THROW.
Referenced by CLZOCompressor::End(), CLZODecompressor::End(), CTransparentProcessor::End(), CLZOCompressor::Init(), CLZODecompressor::Init(), and CTransparentProcessor::Init().
|
virtual |
Implements ICompression.
|
virtual |
Implements ICompression.
Definition at line 793 of file lzo.cpp.
References CCompression::SetError().
|
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.
| dict | Dictionary 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". |
| own | If set to eTakeOwnership the dictionary will be owned by CCompression and automatically deleted when necessary. |
Implements ICompression.
|
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.
| dict | Dictionary 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". |
| own | If set to eTakeOwnership the dictionary will be owned by CCompression and automatically deleted when necessary. |
Implements ICompression.
|
pure virtual |
Set a dictionary for all compression/decompression operations (if supported).
Implemented in CZipCloudflareCompression, CZipCompression, CLZOCompression, and CBZip2Compression.
Set last action error/status code and description.
Definition at line 91 of file compress.cpp.
References kEmptyStr, CCompression::m_ErrorCode, and CCompression::m_ErrorMsg.
Referenced by CLZOCompression::CompressBlock(), CLZOCompression::CompressBlockStream(), CLZOCompression::CompressBuffer(), CLZOCompression::CompressFile(), CLZOCompression::DecompressBlock(), CLZOCompression::DecompressBlockStream(), CLZOCompression::DecompressBuffer(), CLZOCompression::DecompressFile(), CLZOCompressor::End(), CLZODecompressor::End(), CLZOCompressor::Finish(), CLZODecompressor::Finish(), CLZOCompressionFile::GetStreamError(), CLZOCompressor::Init(), CLZODecompressor::Init(), CLZOCompressionFile::Open(), CLZOCompressor::Process(), CLZODecompressor::Process(), CLZOCompression::SetDictionary(), CCompression::x_CompressFile(), and CCompression::x_DecompressFile().
Definition at line 98 of file compress.cpp.
References CCompression::m_ErrorCode, and CCompression::m_ErrorMsg.
Set information about compressed file.
Definition at line 1127 of file lzo.cpp.
References info, and CLZOCompressor::m_FileInfo.
Referenced by CLZOCompressionFile::Open().
Set information about compressed file.
Used for compression of gzip files.
Set information about compressed file.
Used for compression of gzip files.
|
inlinevirtual |
|
virtual |
Implements ICompression.
Definition at line 111 of file compress.cpp.
References flags, and CCompression::m_Flags.
Referenced by CLZOCompressor::CLZOCompressor(), CLZODecompressor::CLZODecompressor(), CLZOCompression::CompressFile(), CResultZBtSrcX::CResultZBtSrcX(), CT_CompressBuffer(), CT_DecompressBuffer(), and CLZOCompression::DecompressFile().
|
inline |
Set processing flags.
Definition at line 862 of file tar.hpp.
References flags, and CTar::m_Flags.
Referenced by CDownloadJob::x_DownloadAndExtract().
|
pure virtual |
Implemented in CCompression.
|
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.
|
pure virtual |
Implemented in CCompression.
| 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.
| mask | Set of masks (0 to unset the current set without setting a new one). |
| own | Whether to take ownership on the mask (delete upon CTar destruction). |
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().
| 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.
| mask | Set of masks (NULL unset the current set without setting a new one). |
| own | Whether to take ownership on the mask (delete upon CArchive destruction). |
| type | Type 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. |
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().
|
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 >().
|
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.
|
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.
|
inline |
Compression strategy.
The strategy parameter is used to tune the compression algorithm.
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.
|
inline |
Compression strategy.
The strategy parameter is used to tune the compression algorithm.
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.
|
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.
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 >().
|
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.
Definition at line 469 of file zlib_cloudflare.hpp.
References CZipCloudflareCompression::GetWindowBitsDefault(), kZlibDefaultWbits, and CZipCloudflareCompression::m_cd_WindowBits.
|
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.
|
inline |
Definition at line 353 of file zlib_cloudflare.hpp.
|
inlinevirtual |
Don't need to be implemented for ZIP format.
Implements IArchive.
Definition at line 238 of file archive_zip.hpp.
|
pure virtual |
Don't need to be implemented for ZIP format.
Implemented in CArchiveZip.
|
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().
|
inline |
Definition at line 411 of file archive.hpp.
|
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().
|
static |
Store 4 bytes of value in the buffer.
Definition at line 222 of file compress.cpp.
References buf, buffer, i, kMax_UI4, NCBI_THROW, and rapidjson::value.
Referenced by CLZOCompression::CompressBlock(), CLZOCompression::CompressBlockStream(), CLZOCompression::CompressBuffer(), CLZOCompressor::Finish(), and s_WriteLZOHeader().
|
virtual |
Verify archive integrity.
Read through the archive without actually extracting anything from it. Test all archive entries, whose names match the preset mask.
Definition at line 334 of file archive.cpp.
References ARCHIVE_CHECK, CArchive::eTest, CArchive::x_Open(), and CArchive::x_ReadAndProcess().
|
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.
Definition at line 849 of file tar.hpp.
References CTar::eTest, CTar::x_Open(), and CTar::x_ReadAndProcess().
|
virtual |
Verify entry integrity.
| info | Entry 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.
|
pure virtual |
|
protectedvirtual |
Definition at line 505 of file archive.cpp.
References ARCHIVE, ARCHIVE_THROW1, CDirEntry::eBlockSpecial, CDirEntry::eCharSpecial, CDirEntry::eDir, CDirEntry::eFile, CDirEntry::eLink, CDirEntry::ePipe, CDirEntry::eUnknown, F_ISSET, CArchive::fSkipUnsupported, CArchiveEntryInfo::GetType(), and CArchive::m_Current.
Referenced by CArchive::x_ReadAndProcess().
| void CArchive::UnsetMask | ( | EMaskType | type | ) |
Unset name mask for processing.
Definition at line 280 of file archive.cpp.
References eNoOwnership, NULL, and CArchive::SetMask().
| void CArchive::UnsetMask | ( | void | ) |
Definition at line 286 of file archive.cpp.
References CArchive::eFullPathMask, eNoOwnership, CArchive::ePatternMask, NULL, and CArchive::SetMask().
Referenced by CArchive::~CArchive().
|
inline |
Look whether more recent copies of the archive members are available in the file system, and if so, append them to the archive:
Definition at line 835 of file tar.hpp.
References CTar::eUpdate, CTar::x_Append(), CTar::x_Open(), and CTar::x_ReadAndProcess().
|
virtual |
Write data to compressed file.
Writes the given number of uncompressed bytes from the buffer into the compressed file.
| buf | Buffer with written data. |
| len | Number of bytes to write. |
Implements CCompressionFile.
|
virtual |
Write data to compressed file.
Writes the given number of uncompressed bytes from the buffer into the compressed file.
| buf | Buffer with written data. |
| len | Number of bytes to write. |
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.
|
virtual |
Write data to compressed file.
Writes the given number of uncompressed bytes from the buffer into the compressed file.
| buf | Buffer with written data. |
| len | Number of bytes to write. |
Implements CCompressionFile.
|
virtual |
Write data to compressed file.
Writes the given number of uncompressed bytes from the buffer into the compressed file.
| buf | Buffer with written data. |
| len | Number of bytes to write. |
Implements CCompressionFile.
|
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().
|
private |
Definition at line 4410 of file tar.cpp.
References CDirEntry::SStat::atime_nsec, CDirEntry::SStat::ctime_nsec, CTarEntryInfo::eFile, NStr::EndsWith(), entries, eRead, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, fTarGRead, fTarGWrite, fTarORead, fTarOWrite, fTarURead, fTarUWrite, CTime::GetCurrentTimeT(), CUnixFeature::GetGroupNameByGID(), CCurrentProcess::GetHandle(), CTarEntryInfo::GetName(), CWinSecurity::GetObjectOwner(), CUnixFeature::GetUserNameByUID(), kEmptyStr, CTar::m_Current, CTarEntryInfo::m_GroupName, CTarEntryInfo::m_Name, CTarEntryInfo::m_Pos, CTarEntryInfo::m_Stat, CTar::m_StreamPos, CTarEntryInfo::m_Type, CTarEntryInfo::m_UserName, CDirEntry::SStat::mtime_nsec, CDirEntry::SStat::orig, s_ModeToTar(), s_TarToMode(), s_ToArchiveName(), NStr::Split(), TAR_THROW, and CTar::x_AppendStream().
|
private |
Definition at line 4190 of file tar.cpp.
References _ASSERT, _TROUBLE, CNcbiError::Code(), CDirEntry::eBlockSpecial, CDirEntry::eCharSpecial, CDirEntry::eDir, CDirEntry::eDoor, CTar::eExcludeMask, CDirEntry::eFile, eFollowLinks, CTarEntryInfo::eHardLink, eIgnoreLinks, CDir::eIgnoreRecursive, entries, CDirEntry::ePipe, eRead, Error(), CDirEntry::eSocket, CDirEntry::eSymLink, CTarEntryInfo::eSymLink, CDirEntry::eUnknown, CTar::fEqualTypes, CTar::fFollowLinks, CTar::fIgnoreUnreadable, CTar::fOverwrite, CTar::fSkipUnsupported, NStr::fSplit_MergeDelimiters, NStr::fSplit_Truncate, CTar::fUpdate, CTarEntryInfo::GetGroupName(), CNcbiError::GetLast(), CTarEntryInfo::GetLinkName(), CTarEntryInfo::GetModificationCTime(), CDirEntry::GetOwner(), CDirEntry::GetType(), CTarEntryInfo::GetType(), CTarEntryInfo::GetUserName(), NStr::IntToString(), ITERATE, kEmptyStr, CDirEntry::LookupLink(), CTar::m_BaseDir, CTar::m_Current, CTar::m_Flags, CTarEntryInfo::m_GroupName, CTarEntryInfo::m_LinkName, CTar::m_Mask, CTarEntryInfo::m_Name, CTarEntryInfo::m_Path, CTarEntryInfo::m_Stat, CTar::m_StreamPos, CTarEntryInfo::m_Type, CTarEntryInfo::m_UserName, mask, CDirEntry::SStat::orig, out(), REVERSE_ITERATE, s_MatchExcludeMask(), s_ModeToTar(), s_OSReason(), s_ToArchiveName(), s_ToFilesystemPath(), NStr::Split(), CDirEntry::Stat(), TAR_POST, TAR_THROW, NStr::UIntToString(), Warning(), CTar::x_AppendFile(), and CTar::x_WriteEntryInfo().
Referenced by CTar::Append(), and CTar::Update().
|
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().
|
protected |
Definition at line 1101 of file archive.cpp.
References CArchive::AppendEntry(), CArchive::Checkpoint(), CArchive::eAppend, CArchive::m_Current, and CArchive::m_Modified.
Referenced by CArchive::x_Append().
Definition at line 4560 of file tar.cpp.
References _ASSERT, CTarEntryInfo::eFile, Error(), CTar::fIgnoreUnreadable, file, CTarEntryInfo::GetType(), in(), CTar::m_Current, CTar::m_Flags, s_OSReason(), TAR_POST, TAR_THROW, and CTar::x_AppendStream().
Referenced by CTar::x_Append().
|
private |
Definition at line 4505 of file tar.cpp.
References _ASSERT, ALIGN_SIZE, CTarEntryInfo::eFile, eRead, failure, CTarEntryInfo::GetSize(), CTarEntryInfo::GetType(), CTar::m_Buffer, CTar::m_BufferPos, CTar::m_BufferSize, CTar::m_Current, CTar::m_StreamPos, OFFSET_OF, s_OSReason(), ncbi::grid::netcache::search::fields::size, TAR_THROW, CTar::x_WriteArchive(), and CTar::x_WriteEntryInfo().
Referenced by CTar::x_Append(), and CTar::x_AppendFile().
|
private |
Definition at line 2852 of file tar.cpp.
References _ASSERT, BLOCK_OF, BLOCK_SIZE, CT_OFF_TYPE, CT_POS_TYPE, CTar::eAppend, Error(), CTar::eUpdate, CTar::m_BufferPos, CTar::m_BufferSize, CTar::m_Current, CTar::m_FileStream, CTarEntryInfo::m_Name, CTar::m_Stream, CTar::m_StreamPos, CTar::m_ZeroBlockCount, NcbiBadbit, OFFSET_OF, s_SetStateSafe(), SIZE_OF, TAR_POST, Warning(), and CTar::x_ReadArchive().
Referenced by CTar::x_ReadAndProcess().
|
private |
Definition at line 1486 of file tar.cpp.
References CTar::eNone, Error(), CTar::fTarfileNoTruncate, CTar::m_Bad, CTar::m_BufferPos, CTar::m_FileName, CTar::m_FileStream, CTar::m_Flags, CTar::m_Modified, CTar::m_OpenMode, CTar::m_StreamPos, s_OSReason(), s_TruncateFile(), and TAR_POST.
Referenced by CTar::Close(), CTar::x_Open(), and CTar::~CTar().
|
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().
|
protected |
Definition at line 393 of file reader_zlib.cpp.
References CDynamicCharArray::Alloc(), CDynamicCharArray::At(), eRW_Eof, eRW_Error, eRW_Success, i, CNlmZipReader::m_Buffer, CNlmZipReader::m_BufferEnd, CNlmZipReader::m_BufferPos, CNlmZipReader::m_Compressed, CNlmZipReader::m_Decompressor, result, and CNlmZipReader::x_Read().
Referenced by CNlmZipReader::Read().
|
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().
Definition at line 685 of file archive.cpp.
References ARCHIVE_THROW, ARCHIVE_THROW1, CDirEntry::Backup(), CDirEntry::ConcatPath(), CDirEntry::CreateObject(), CDirEntry::eBackup_Rename, CDirEntry::eDir, CArchive::eExtract, CDirEntry::eFile, CDirEntry::eLink, CDirEntry::eTmpFileCreate, CDirEntry::eUnknown, CArchive::ExtractEntry(), F_ISSET, CArchive::fBackup, CArchive::fEqualTypes, CArchive::fFollowLinks, CArchive::fOverwrite, CDirEntry::fRF_Default, CDirEntry::fRF_Overwrite, CArchive::fUpdate, CArchiveEntryInfo::GetModificationTime(), CArchiveEntryInfo::GetName(), CDirEntry::GetTmpNameEx(), CArchiveEntryInfo::GetType(), ITERATE, kEmptyStr, CArchive::m_BaseDir, CArchive::m_Current, CDirEntry::NormalizePath(), AutoPtr< X, Del >::reset(), s_OSReason(), tmp, and CArchive::x_RestoreAttrs().
Referenced by CArchive::x_ReadAndProcess().
Definition at line 3582 of file tar.cpp.
References _ASSERT, _TROUBLE, CNcbiError::Code(), CDirEntry::Copy(), CSymLink::Create(), CDir::CreatePath(), CTarEntryInfo::eBlockDev, CTarEntryInfo::eCharDev, CTar::eCreate, CTarEntryInfo::eDir, CTarEntryInfo::eFile, CTarEntryInfo::eGNULongLink, CTarEntryInfo::eGNULongName, CTarEntryInfo::eHardLink, CTarEntryInfo::ePAXHeader, CTarEntryInfo::ePipe, Error(), CTarEntryInfo::eSparseFile, CTarEntryInfo::eSymLink, CDirEntry::eUnknown, CTarEntryInfo::eUnknown, CTarEntryInfo::eVolHeader, CDirEntry::Exists(), CDirEntry::fCF_Overwrite, CDirEntry::fCF_PreserveAll, CTar::fKeepAbsolutePath, CTar::fPreserveAll, CTar::fSkipUnsupported, CDirEntry::GetDir(), CNcbiError::GetLast(), CTarEntryInfo::GetLinkName(), CTarEntryInfo::GetMode(), CTarEntryInfo::GetName(), CDirEntry::GetPath(), CDirEntry::GetType(), CTarEntryInfo::GetType(), NStr::IntToString(), CTar::m_BaseDir, CTar::m_Current, CTar::m_Flags, CTarEntryInfo::m_Stat, CDirEntry::SStat::orig, s_OSReason(), s_ToFilesystemPath(), CNcbiError::SetErrno(), ncbi::grid::netcache::search::fields::size, string, TAR_POST, TAR_THROW, Warning(), CTar::x_ExtractPlainFile(), CTar::x_ExtractSparseFile(), and CTar::x_RestoreAttrs().
Referenced by CTar::x_ProcessEntry().
Definition at line 3787 of file tar.cpp.
References _ASSERT, ALIGN_SIZE, data, CTar::eCreate, eRead, failure, CTar::fPreserveMode, fTarURead, fTarUWrite, CDirEntry::GetPath(), CTar::m_BufferSize, CTar::m_Current, CTar::m_Flags, CTar::m_StreamPos, out(), s_OSReason(), ncbi::grid::netcache::search::fields::size, TAR_THROW, true, trunc, CTar::x_ReadArchive(), and CTar::x_RestoreAttrs().
Referenced by CTar::x_ExtractEntry().
Definition at line 3889 of file tar.cpp.
References _ASSERT, _T_STDSTRING, ALIGN_SIZE, BLOCK_SIZE, data, done, dump, CTar::eCreate, eRead, Error(), NStr::fConvErr_NoErrMessage, NStr::fConvErr_NoThrow, fp, CTar::fPreserveMode, fseek, fTarURead, fTarUWrite, CTarEntryInfo::GetName(), CDirEntry::GetPath(), i, CTar::m_BufferSize, CTar::m_Current, CTar::m_FileName, CTar::m_Flags, CTar::m_StreamPos, n, NCBI_FILE_WO, NULL, NStr::NumericToString(), CDirEntry::Remove(), s_DumpSparse(), s_OSReason(), s_TruncateFile(), SEEK_SET, CNcbiError::SetErrno(), ncbi::grid::netcache::search::fields::size, str(), string, NStr::StringToUInt8(), TAR_POST, TAR_THROW, true, NStr::UIntToString(), val, CTar::x_ReadArchive(), CTar::x_ReadLine(), and CTar::x_RestoreAttrs().
Referenced by CTar::x_ExtractEntry(), and CTar::x_ProcessEntry().
Definition at line 1397 of file tar.cpp.
References _ASSERT, BLOCK_OF, BLOCK_SIZE, Error(), CTar::fStreamPipeThrough, CTar::m_Bad, CTar::m_Buffer, CTar::m_BufferPos, CTar::m_BufferSize, CTar::m_Current, CTar::m_FileStream, CTar::m_Flags, CTar::m_Modified, CTarEntryInfo::m_Name, CTar::m_OpenMode, CTar::m_Stream, CTar::m_StreamPos, CTar::m_ZeroBlockCount, NcbiBadbit, OFFSET_OF, pad(), s_OSReason(), s_SetStateSafe(), TAR_POST, TAR_THROW, and CTar::x_WriteArchive().
Referenced by CTar::Close(), CTar::x_Open(), and CTar::~CTar().
|
private |
Definition at line 1382 of file tar.cpp.
References _ASSERT, CSystemInfo::GetVirtualMemoryPageSize(), CTar::m_Buffer, CTar::m_BufferSize, CTar::m_BufPtr, and OFFSET_OF.
Referenced by CTar::CTar().
|
protected |
Definition at line 564 of file archive.cpp.
References ARCHIVE_THROW, CArchive::Close(), CArchive::eAppend, CArchive::eCreate, IArchive::eFileStream, CArchive::eRW, CArchive::eWO, CArchive::m_Location, CArchive::m_OpenMode, and CArchive::Open().
Referenced by CArchive::Append(), CArchive::AppendFileFromMemory(), CArchiveMemory::Create(), CArchive::Create(), CArchive::Extract(), CArchive::ExtractFileToCallback(), CArchive::ExtractFileToMemory(), CArchive::List(), and CArchive::Test().
|
private |
Definition at line 1507 of file tar.cpp.
References _ASSERT, _TROUBLE, CTar::eAppend, CTar::eCreate, CTar::eInternal, CTar::eNone, CTar::eRO, CTar::eRW, CTar::eWO, CTar::fSlowSkipWithRead, CTar::fStreamPipeThrough, HANDLE, in(), CTar::m_Bad, CTar::m_BufferPos, CTar::m_Current, CTar::m_FileName, CTar::m_FileStream, CTar::m_Flags, CTar::m_Modified, CTarEntryInfo::m_Name, CTar::m_OpenMode, CTar::m_Stream, CTar::m_StreamPos, NcbiEofbit, out(), s_OSReason(), TAR_POST, TAR_THROW, trunc, Warning(), CTar::x_Close(), CTar::x_Flush(), and CTar::x_ReadAndProcess().
Referenced by CTar::Append(), CTar::Create(), CTar::Extract(), CTar::GetNextEntryInfo(), CTar::List(), CTar::Test(), and CTar::Update().
|
private |
Definition at line 2778 of file tar.cpp.
References _ASSERT, TTarBlock::buffer, CTar::fLongNameSupplement, CTar::fStandardHeaderOnly, CTarEntryInfo::GetLinkName(), CTarEntryInfo::GetName(), STarHeader::gid, TTarBlock::header, i, len, STarHeader::linkname, CTar::m_Buffer, CTar::m_BufferPos, CTar::m_BufferSize, CTar::m_Current, CTar::m_Flags, STarHeader::magic, STarHeader::mode, STarHeader::mtime, STarHeader::name, OFFSET_OF, STarHeader::prefix, s_EncodeUint8(), s_NumToOctal(), s_TarChecksum(), ncbi::grid::netcache::search::fields::size, STarHeader::size, sx_Signature(), STarHeader::typeflag, STarHeader::uid, and CTar::x_WriteArchive().
Referenced by CTar::x_WriteEntryInfo().
|
private |
Definition at line 1925 of file tar.cpp.
References _ASSERT, CDirEntry::SStat::atime_nsec, CDirEntry::SStat::ctime_nsec, data, done, dummy, CTar::eContinue, CTar::eFailure, Error(), fPAXAtime, fPAXCtime, fPAXGid, fPAXMtime, fPAXNone, fPAXSize, fPAXSparse, fPAXSparseGNU_1_0, fPAXUid, CTar::fSparseUnsupported, isdigit(), ncbi::grid::netcache::search::fields::key, len, CTar::m_Current, CTar::m_Flags, CTarEntryInfo::m_GroupName, CTarEntryInfo::m_LinkName, CTarEntryInfo::m_Name, CTarEntryInfo::m_Pos, CTarEntryInfo::m_Stat, CTarEntryInfo::m_UserName, CDirEntry::SStat::mtime_nsec, n, NStr::NumericToString(), CDirEntry::SStat::orig, s_AllLowerCase(), s_FraqToNanosec(), s_ParsePAXNumeric(), ncbi::grid::netcache::search::fields::size, str(), TAR_POST, val, and Warning().
Referenced by CTar::x_ReadEntryInfo().
Definition at line 3337 of file tar.cpp.
References ALIGN_SIZE, BLOCK_OF, CNcbiError::Code(), NStr::CompareCase(), NStr::CompareNocase(), CDirEntry::CreateObject(), CDirEntry::eBackup_Rename, CDirEntry::eDir, CTarEntryInfo::eDir, CTar::eExtract, CDirEntry::eFile, eFollowLinks, CTarEntryInfo::eHardLink, CDirEntry::eIfAbsent_Throw, eIgnoreLinks, entries, Error(), CTarEntryInfo::eSparseFile, CTarEntryInfo::eSymLink, CTar::eTest, CDirEntry::eUnknown, CTarEntryInfo::eUnknown, CTar::fBackup, CTar::fConflictOverwrite, CTar::fDumpEntryHeaders, CTar::fEqualTypes, CTar::fFollowLinks, CTar::fIgnoreNameCase, CTar::fKeepAbsolutePath, CTar::fOverwrite, CTar::fUpdate, CNcbiError::GetLast(), CTarEntryInfo::GetLinkName(), CTarEntryInfo::GetModificationCTime(), CTarEntryInfo::GetName(), CTarEntryInfo::GetType(), ITERATE, kEmptyStr, CTar::m_BaseDir, CTar::m_Current, CTar::m_Flags, CTarEntryInfo::m_Path, CDirEntry::SStat::orig, AutoPtr< X, Del >::reset(), s_OSReason(), s_ToFilesystemPath(), ncbi::grid::netcache::search::fields::size, CDirEntry::Stat(), TAR_POST, TAR_THROW, tmp, x_DropTrailingSlashes(), CTar::x_ExtractEntry(), CTar::x_ExtractSparseFile(), and CTar::x_Skip().
Referenced by CTar::x_ReadAndProcess().
|
protected |
Definition at line 440 of file reader_zlib.cpp.
References buffer, cnt, eRW_Success, CNlmZipReader::m_Reader, IReader::Read(), and result.
Referenced by CNlmZipReader::x_DecompressBuffer().
|
protected |
Definition at line 605 of file archive.cpp.
References _ASSERT, _TROUBLE, CArchive::SMask::acase, ARCHIVE, ARCHIVE_THROW, CArchive::Checkpoint(), CArchive::eExtract, CArchive::eList, entries, CArchive::eTest, NStr::fSplit_MergeDelimiters, i, ITERATE, CArchive::m_Current, CArchive::m_MaskFullPath, CArchive::m_MaskPattern, CArchiveEntryInfo::m_Name, CArchive::SMask::mask, CMask::Match(), match(), n, CArchiveEntryInfo::Reset(), CArchive::SkipEntry(), NStr::Split(), CArchive::TestEntry(), and CArchive::x_ExtractEntry().
Referenced by CArchive::Extract(), CArchive::List(), and CArchive::Test().
|
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().
|
private |
Definition at line 1674 of file tar.cpp.
References _ASSERT, ALIGN_SIZE, Error(), failure, CTar::fDumpEntryHeaders, CTar::fStreamPipeThrough, CTar::m_Buffer, CTar::m_BufferPos, CTar::m_BufferSize, CTar::m_FileStream, CTar::m_Flags, CTar::m_Stream, CTar::m_StreamPos, CTar::m_ZeroBlockCount, n, NcbiBadbit, NcbiEofbit, NStr::NumericToString(), OFFSET_OF, s_SetStateSafe(), TAR_POST, Warning(), and CTar::x_WriteArchive().
Referenced by CTarReader::Read(), CTar::x_Backspace(), CTar::x_ExtractPlainFile(), CTar::x_ExtractSparseFile(), CTar::x_ReadEntryInfo(), CTar::x_ReadLine(), and CTar::x_Skip().
|
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().
Definition at line 3839 of file tar.cpp.
References _ASSERT, ALIGN_SIZE, BLOCK_SIZE, data, isprint(), kEmptyStr, CTar::m_StreamPos, n, ncbi::grid::netcache::search::fields::size, and CTar::x_ReadArchive().
Referenced by CTar::x_ExtractSparseFile().
|
protected |
Definition at line 348 of file reader_zlib.cpp.
References buffer, CNlmZipReader::eHeaderNone, eRW_Success, CNlmZipReader::kHeaderSize, CNlmZipReader::m_Header, CNlmZipReader::m_Reader, IReader::Read(), result, CNlmZipReader::x_StartDecompressor(), and CNlmZipReader::x_StartPlain().
Referenced by CNlmZipReader::Read().
|
protected |
Definition at line 804 of file archive.cpp.
References ARCHIVE_THROW, CDirEntry::ConcatPath(), CDirEntry::CreateObject(), CDirEntry::eBlockSpecial, CDirEntry::eCharSpecial, eIgnoreLinks, CDirEntry::eLink, CDirEntry::ePipe, F_ISSET, failed, CArchive::fPreserveMode, CArchive::fPreserveOwner, CArchive::fPreserveTime, CDirEntry::GetPath(), info, kEmptyStr, CArchive::m_BaseDir, CDirEntry::ModeFromModeT(), CDirEntry::NormalizePath(), s_OSReason(), CDirEntry::SetMode(), CDirEntry::SetOwner(), CDirEntry::SetTimeT(), and NStr::UIntToString().
Referenced by CArchive::Extract(), and CArchive::x_ExtractEntry().
|
private |
Definition at line 4073 of file tar.cpp.
References _ASSERT, CNcbiError::Code(), done, CTarEntryInfo::eBlockDev, CTarEntryInfo::eCharDev, eIgnoreLinks, CTarEntryInfo::ePipe, CTarEntryInfo::eSymLink, failed, CTar::fPreserveMode, CTar::fPreserveOwner, CTar::fPreserveTime, CNcbiError::GetLast(), CDirEntry::GetPath(), info, kEmptyStr, s_OSReason(), s_TarToMode(), CNcbiError::SetFromErrno(), CDirEntry::SetMode(), CTime::SetNanoSecond(), CDirEntry::SetOwner(), CDirEntry::SetTime(), TAR_THROW, and NStr::UIntToString().
Referenced by CTar::Extract(), CTar::x_ExtractEntry(), CTar::x_ExtractPlainFile(), and CTar::x_ExtractSparseFile().
|
private |
Definition at line 3538 of file tar.cpp.
References _ASSERT, ALIGN_SIZE, BLOCK_OF, blocks, CT_OFF_TYPE, CT_POS_TYPE, eRead, CTar::fSlowSkipWithRead, CTar::fStreamPipeThrough, CTar::m_BufferPos, CTar::m_BufferSize, CTar::m_FileStream, CTar::m_Flags, CTar::m_Stream, CTar::m_StreamPos, OFFSET_OF, SIZE_OF, TAR_POST, TAR_THROW, Warning(), and CTar::x_ReadArchive().
Referenced by CTar::GetNextEntryInfo(), and CTar::x_ProcessEntry().
|
protected |
Definition at line 386 of file reader_zlib.cpp.
References CNlmZipReader::eHeaderNone, CNlmZipReader::m_Decompressor, and CNlmZipReader::m_Header.
Referenced by CNlmZipReader::CNlmZipReader(), and CNlmZipReader::x_ReadZipHeader().
|
protected |
Definition at line 376 of file reader_zlib.cpp.
References CNlmZipReader::eHeaderAlways, CNlmZipReader::eHeaderNone, CNlmZipReader::m_Header, and NCBI_THROW.
Referenced by CNlmZipReader::x_ReadZipHeader().
|
private |
Definition at line 1758 of file tar.cpp.
References _ASSERT, ALIGN_SIZE, Error(), failure, CTar::m_Bad, CTar::m_Buffer, CTar::m_BufferPos, CTar::m_BufferSize, CTar::m_Modified, CTar::m_Stream, CTar::m_StreamPos, CTar::m_ZeroBlockCount, NcbiBadbit, NcbiEofbit, pad(), s_OSReason(), s_SetStateSafe(), TAR_POST, and TAR_THROW.
Referenced by CTar::x_AppendStream(), CTar::x_Flush(), CTar::x_PackCurrentName(), CTar::x_ReadArchive(), and CTar::x_WriteEntryInfo().
Definition at line 2604 of file tar.cpp.
References _ASSERT, _TROUBLE, BLOCK_SIZE, TTarBlock::buffer, CTar::Checkpoint(), STarHeader::devmajor, STarHeader::devminor, CTarEntryInfo::eBlockDev, CTarEntryInfo::eCharDev, CTarEntryInfo::eDir, CTarEntryInfo::eFile, CTarEntryInfo::ePipe, CTarEntryInfo::eSymLink, eTar_OldGNU, eTar_Ustar, CTar::fStandardHeaderOnly, CTarEntryInfo::GetGroupId(), CTarEntryInfo::GetGroupName(), CTarEntryInfo::GetLinkName(), CTarEntryInfo::GetMajor(), CTarEntryInfo::GetMinor(), CTarEntryInfo::GetMode(), CTarEntryInfo::GetModificationTime(), CTarEntryInfo::GetName(), CTarEntryInfo::GetSize(), CTarEntryInfo::GetType(), CTarEntryInfo::GetUserId(), CTarEntryInfo::GetUserName(), STarHeader::gid, STarHeader::gname, TTarBlock::header, NStr::IntToString(), len, CTar::m_Current, CTar::m_Flags, CTarEntryInfo::m_HeaderSize, CTarEntryInfo::m_Pos, CTar::m_StreamPos, STarHeader::magic, STarHeader::mode, STarHeader::mtime, ok, STarHeader::prefix, s_EncodeUint8(), s_NumToOctal(), s_TarChecksum(), STarHeader::size, sx_Signature(), TAR_THROW, STarHeader::typeflag, STarHeader::uid, STarHeader::uname, STarHeader::version, CTar::x_PackCurrentName(), and CTar::x_WriteArchive().
Referenced by CTar::x_Append(), and CTar::x_AppendStream().
|
virtual |
Destructor.
Close the archive if currently open.
Definition at line 231 of file archive.cpp.
References ARCHIVE, CArchive::Close(), COMPRESS_HANDLE_EXCEPTIONS, CArchive::m_Archive, and CArchive::UnsetMask().
|
virtual |
Destructor.
Close the archive if currently open.
Definition at line 1282 of file archive.cpp.
References CArchiveCompressionFileStream::m_fd, and CArchiveCompressionFileStream::m_FileStream.
|
virtual |
Destructor.
Definition at line 118 of file archive_zip.cpp.
References CArchiveZip::Close(), COMPRESS_HANDLE_EXCEPTIONS, and CArchiveZip::m_Handle.
|
virtual |
Destructor.
| CBZip2CompressionFile::~CBZip2CompressionFile | ( | void | ) |
Destructor.
|
virtual |
Destructor.
|
virtual |
Destructor.
|
virtual |
Definition at line 55 of file compress.cpp.
References eTakeOwnership, CCompression::m_Dict, and CCompression::m_DictOwn.
|
virtual |
|
virtual |
Definition at line 210 of file compress.cpp.
|
virtual |
Definition at line 192 of file compress.cpp.
| CDynamicCharArray::~CDynamicCharArray | ( | void | ) |
Definition at line 52 of file reader_zlib.cpp.
References CDynamicCharArray::m_Array.
|
virtual |
| CLZOCompressionFile::~CLZOCompressionFile | ( | void | ) |
Destructor.
Definition at line 895 of file lzo.cpp.
References CLZOCompressionFile::Close(), and COMPRESS_HANDLE_EXCEPTIONS.
|
virtual |
Destructor.
Definition at line 1118 of file lzo.cpp.
References CLZOCompressor::End(), and CCompressionProcessor::IsBusy().
|
virtual |
| CNlmZipBtRdr::~CNlmZipBtRdr | ( | ) |
Definition at line 207 of file reader_zlib.cpp.
| CNlmZipReader::~CNlmZipReader | ( | void | ) |
Definition at line 279 of file reader_zlib.cpp.
References CNlmZipReader::fOwnReader, CNlmZipReader::m_Own, and CNlmZipReader::m_Reader.
|
virtual |
Destructor (finalize the archive if currently open).
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().
|
virtual |
Destructor.
| CZipCloudflareCompressionFile::~CZipCloudflareCompressionFile | ( | void | ) |
Destructor.
|
virtual |
Destructor.
|
virtual |
Destructor.
|
virtual |
Destructor.
| CZipCompressionFile::~CZipCompressionFile | ( | void | ) |
Destructor.
|
virtual |
Destructor.
|
virtual |
Destructor.
|
inlinevirtual |
Definition at line 220 of file archive_.hpp.
|
inlinevirtual |
Destructor.
Definition at line 642 of file compress.hpp.
|
inlinevirtual |
Destructor.
Definition at line 164 of file compress.hpp.
| NStr::ECase CArchive::SMask::acase |
Definition at line 409 of file archive.hpp.
Referenced by CArchive::SetMask(), CArchive::x_Append(), and CArchive::x_ReadAndProcess().
| NStr::ECase CTar::SMask::acase |
Definition at line 693 of file tar.hpp.
Referenced by CTar::SetMask(), and CTar::x_ReadAndProcess().
| string CZipCloudflareCompression::SFileInfo::comment |
Definition at line 351 of file zlib_cloudflare.hpp.
| size_t CCompression::SRecommendedBufferSizes::compression_in |
compression: recommended size for input buffer
Definition at line 300 of file compress.hpp.
Referenced by CLZOCompression::GetRecommendedBufferSizes().
| size_t CCompression::SRecommendedBufferSizes::compression_out |
compression: recommended size for output buffer
Definition at line 301 of file compress.hpp.
Referenced by CLZOCompression::GetRecommendedBufferSizes().
| size_t CCompression::SRecommendedBufferSizes::decompression_in |
decompression: recommended size for input buffer
Definition at line 302 of file compress.hpp.
Referenced by CLZOCompression::GetRecommendedBufferSizes().
| size_t CCompression::SRecommendedBufferSizes::decompression_out |
decompression: recommended size for output buffer
Definition at line 303 of file compress.hpp.
Referenced by CLZOCompression::GetRecommendedBufferSizes().
| 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().
| const size_t kLZODefaultBlockSize = 24*1024 |
Default LZO block size.
Definition at line 68 of file zlib.hpp.
Referenced by CZipCompression::SetMemoryLevel(), and CZipCloudflareCompression::SetMemoryLevel().
Definition at line 69 of file zlib.hpp.
Referenced by CZipCompression::SetStrategy(), and CZipCloudflareCompression::SetStrategy().
Definition at line 67 of file zlib.hpp.
Referenced by CZipCompression::SetWindowBits(), and CZipCloudflareCompression::SetWindowBits().
|
protected |
Pointer to interface to EFormat-specific archive support.
Definition at line 477 of file archive.hpp.
Referenced by CArchive::CArchive(), and CArchive::~CArchive().
|
private |
Definition at line 98 of file reader_zlib.hpp.
Referenced by CDynamicCharArray::Alloc(), CDynamicCharArray::At(), and CDynamicCharArray::~CDynamicCharArray().
|
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().
|
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().
|
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().
|
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().
|
protected |
Block size for (de)compression.
Definition at line 453 of file lzo.hpp.
Referenced by CLZOCompression::CompressBuffer(), CLZOCompression::EstimateCompressionBufferSize(), CLZOCompressor::Finish(), CLZOCompression::GetBlockSize(), CLZOCompressor::Init(), CLZOCompressionFile::Open(), CLZOCompressor::Process(), CLZODecompressor::Process(), and CLZOCompression::SetBlockSize().
|
protected |
Buffer where the opening archive is located.
Definition at line 610 of file archive.hpp.
Referenced by CArchiveMemory::CArchiveMemory(), CArchiveMemory::Create(), CArchiveMemory::Finalize(), CArchiveMemory::Load(), CArchiveMemory::Open(), and CArchiveMemory::Save().
|
private |
Buffer for caching (size of m_Size*2).
Definition at line 633 of file lzo.hpp.
Referenced by CLZOBuffer::ResetBuffer().
|
private |
Definition at line 151 of file reader_zlib.hpp.
Referenced by CNlmZipReader::Read(), and CNlmZipReader::x_DecompressBuffer().
|
private |
I/O buffer (page-aligned)
Definition at line 784 of file tar.hpp.
Referenced by CTarReader::Read(), CTar::x_AppendStream(), CTar::x_Flush(), CTar::x_Init(), CTar::x_PackCurrentName(), CTar::x_ReadArchive(), and CTar::x_WriteArchive().
|
private |
Definition at line 153 of file reader_zlib.hpp.
Referenced by CNlmZipReader::PendingCount(), CNlmZipReader::Read(), and CNlmZipReader::x_DecompressBuffer().
|
private |
Definition at line 152 of file reader_zlib.hpp.
Referenced by CNlmZipReader::PendingCount(), CNlmZipReader::Read(), and CNlmZipReader::x_DecompressBuffer().
|
private |
Position within the record.
Definition at line 781 of file tar.hpp.
Referenced by CTarReader::PendingCount(), CTarReader::Read(), CTar::x_AppendStream(), CTar::x_Backspace(), CTar::x_Close(), CTar::x_Flush(), CTar::x_Open(), CTar::x_PackCurrentName(), CTar::x_ReadArchive(), CTar::x_Skip(), and CTar::x_WriteArchive().
|
private |
Buffer(record) size for I/O operations.
Definition at line 780 of file tar.hpp.
Referenced by CTarReader::PendingCount(), CTarReader::Read(), CTar::x_AppendStream(), CTar::x_Backspace(), CTar::x_ExtractPlainFile(), CTar::x_ExtractSparseFile(), CTar::x_Flush(), CTar::x_Init(), CTar::x_PackCurrentName(), CTar::x_ReadAndProcess(), CTar::x_ReadArchive(), CTar::x_ReadEntryInfo(), CTar::x_Skip(), and CTar::x_WriteArchive().
|
private |
Page-unaligned buffer pointer.
Definition at line 783 of file tar.hpp.
Referenced by CTar::x_Init(), and CTar::~CTar().
|
protected |
Size of m_Buf.
Definition at line 611 of file archive.hpp.
Referenced by CArchiveMemory::CArchiveMemory(), CArchiveMemory::Finalize(), CArchiveMemory::Load(), CArchiveMemory::Open(), and CArchiveMemory::Save().
|
private |
Definition at line 565 of file compress.hpp.
|
protected |
The allocation memory level for the compression.
Definition at line 491 of file zlib.hpp.
Referenced by CZipCompression::GetMemoryLevel(), and CZipCompression::SetMemoryLevel().
|
protected |
The allocation memory level for the compression.
Definition at line 485 of file zlib_cloudflare.hpp.
Referenced by CZipCloudflareCompression::GetMemoryLevel(), and CZipCloudflareCompression::SetMemoryLevel().
|
protected |
The parameter to tune up a compression algorithm.
Definition at line 492 of file zlib.hpp.
Referenced by CZipCompression::GetStrategy(), and CZipCompression::SetStrategy().
|
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().
|
protected |
See description above.
Definition at line 299 of file bzip2.hpp.
Referenced by CBZip2Compression::GetWorkFactor(), and CBZip2Compression::SetWorkFactor().
|
private |
Buffer to cache header.
Definition at line 750 of file lzo.hpp.
Referenced by CLZODecompressor::Finish(), CLZODecompressor::Init(), and CLZODecompressor::Process().
|
private |
|
private |
|
private |
Buffer to cache small pieces of data.
Definition at line 689 of file zlib_cloudflare.hpp.
|
private |
Buffer to cache small pieces of data.
Definition at line 738 of file zlib_cloudflare.hpp.
|
protected |
The base two logarithm of the window size.
Definition at line 490 of file zlib.hpp.
Referenced by CZipCompression::GetWindowBits(), and CZipCompression::SetWindowBits().
|
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().
|
protected |
Entry comment.
Definition at line 167 of file archive_.hpp.
Referenced by CArchive::AppendFileFromMemory(), CArchiveEntryInfo::GetComment(), and CArchive::x_Append().
|
private |
Definition at line 155 of file reader_zlib.hpp.
Referenced by CNlmZipReader::x_DecompressBuffer().
|
protected |
Compressed size.
Definition at line 168 of file archive_.hpp.
Referenced by CArchiveEntryInfo::Reset().
|
private |
|
private |
CRC32 for compressed data.
Definition at line 688 of file zlib_cloudflare.hpp.
|
protected |
Information about current entry being processed.
Definition at line 482 of file archive.hpp.
Referenced by CArchive::AppendEntry(), CArchive::AppendFileFromMemory(), CArchive::ExtractEntry(), CArchive::SkipEntry(), CArchive::TestEntry(), CArchive::x_Append(), CArchive::x_AppendEntry(), CArchive::x_ExtractEntry(), and CArchive::x_ReadAndProcess().
|
private |
Current entry being processed.
Definition at line 791 of file tar.hpp.
Referenced by CTar::GetNextEntryData(), CTar::GetNextEntryInfo(), CTarReader::PendingCount(), CTarReader::Read(), CTar::x_Append(), CTar::x_AppendFile(), CTar::x_AppendStream(), CTar::x_Backspace(), CTar::x_ExtractEntry(), CTar::x_ExtractPlainFile(), CTar::x_ExtractSparseFile(), CTar::x_Flush(), CTar::x_Open(), CTar::x_PackCurrentName(), CTar::x_ParsePAXData(), CTar::x_ProcessEntry(), CTar::x_ReadAndProcess(), CTar::x_ReadEntryInfo(), and CTar::x_WriteEntryInfo().
|
protected |
Use memory-frugal decompression algorithm.
Definition at line 300 of file bzip2.hpp.
Referenced by CBZip2Compression::GetSmallDecompress(), and CBZip2Compression::SetSmallDecompress().
|
private |
Pointer to the dictionary data.
Definition at line 449 of file compress.hpp.
Referenced by CCompressionDictionary::Free(), CCompressionDictionary::GetData(), and CCompressionDictionary::LoadFromStream().
|
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().
|
private |
Definition at line 71 of file reader_zlib.hpp.
Referenced by CNlmZipBtRdr::Read().
|
private |
Definition at line 154 of file reader_zlib.hpp.
Referenced by CNlmZipReader::Read(), CNlmZipReader::x_DecompressBuffer(), and CNlmZipReader::x_StartDecompressor().
|
protected |
Dictionary for compression/decompression.
Definition at line 339 of file compress.hpp.
Referenced by CCompression::~CCompression().
|
protected |
Dictionary ownership.
Definition at line 340 of file compress.hpp.
Referenced by CCompression::~CCompression().
|
protected |
|
private |
Last compressor action error/status.
Definition at line 344 of file compress.hpp.
Referenced by CCompression::GetErrorCode(), and CCompression::SetError().
|
private |
Last compressor action error message.
Definition at line 345 of file compress.hpp.
Referenced by CCompression::GetErrorDescription(), and CCompression::SetError().
|
protected |
File/socket descriptor.
Definition at line 698 of file archive.hpp.
Referenced by CArchiveCompressionFileStream::CArchiveCompressionFileStream(), and CArchiveCompressionFileStream::~CArchiveCompressionFileStream().
|
protected |
File handler.
Definition at line 405 of file compress.hpp.
|
protected |
File stream.
Definition at line 601 of file lzo.hpp.
Referenced by CLZOCompressionFile::Close(), and CLZOCompressionFile::Open().
|
protected |
|
protected |
File stream.
Definition at line 632 of file zlib_cloudflare.hpp.
|
private |
Compressed file info.
Definition at line 703 of file lzo.hpp.
Referenced by CLZOCompressor::Finish(), CLZOCompressor::Process(), and CLZOCompressor::SetFileInfo().
|
private |
|
private |
Compressed file info.
Definition at line 692 of file zlib_cloudflare.hpp.
|
protected |
Archive file name.
Definition at line 521 of file archive.hpp.
Referenced by CArchiveFile::CArchiveFile(), and CArchiveFile::Open().
|
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().
|
protected |
File stream, can be based on m_fd.
Definition at line 697 of file archive.hpp.
Referenced by CArchiveCompressionFileStream::CArchiveCompressionFileStream(), CArchiveCompressionFileStream::Open(), and CArchiveCompressionFileStream::~CArchiveCompressionFileStream().
|
protected |
|
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().
|
protected |
Bitwise OR of flags.
Definition at line 480 of file archive.hpp.
Referenced by CArchiveFile::CArchiveFile(), CArchiveMemory::CArchiveMemory(), CArchive::GetFlags(), CArchive::SetFlags(), and CArchive::x_Append().
|
private |
Bitwise OR of flags.
Definition at line 346 of file compress.hpp.
Referenced by CCompression::GetFlags(), and CCompression::SetFlags().
|
private |
Bitwise OR of flags.
Definition at line 789 of file tar.hpp.
Referenced by CTar::Extract(), CTar::GetFlags(), CTar::GetNextEntryData(), CTar::SetFlags(), CTar::x_Append(), CTar::x_AppendFile(), CTar::x_Close(), CTar::x_ExtractEntry(), CTar::x_ExtractPlainFile(), CTar::x_ExtractSparseFile(), CTar::x_Flush(), CTar::x_Open(), CTar::x_PackCurrentName(), CTar::x_ParsePAXData(), CTar::x_ProcessEntry(), CTar::x_ReadAndProcess(), CTar::x_ReadArchive(), CTar::x_ReadEntryInfo(), CTar::x_Skip(), and CTar::x_WriteEntryInfo().
|
protected |
Archive format.
Definition at line 478 of file archive.hpp.
Referenced by CArchive::AppendFileFromMemory(), and CArchive::x_Append().
|
protected |
Group name.
Definition at line 166 of file archive_.hpp.
Referenced by CArchiveEntryInfo::GetGroupName(), CArchiveEntryInfo::operator==(), and CArchive::x_Append().
|
protected |
Group name.
Definition at line 251 of file tar.hpp.
Referenced by CTarEntryInfo::GetGroupName(), CTarEntryInfo::operator==(), CTar::x_Append(), CTar::x_ParsePAXData(), CTar::x_ReadAndProcess(), and CTar::x_ReadEntryInfo().
|
protected |
Archive handle.
Definition at line 271 of file archive_zip.hpp.
Referenced by CArchiveZip::~CArchiveZip().
|
protected |
|
private |
Definition at line 150 of file reader_zlib.hpp.
Referenced by CNlmZipReader::Read(), CNlmZipReader::x_ReadZipHeader(), CNlmZipReader::x_StartDecompressor(), and CNlmZipReader::x_StartPlain().
|
private |
Flags used for compression.
Definition at line 755 of file lzo.hpp.
Referenced by CLZODecompressor::DecompressCache(), and CLZODecompressor::Process().
|
private |
Length of the header.
Definition at line 754 of file lzo.hpp.
Referenced by CLZODecompressor::Finish(), CLZODecompressor::Init(), and CLZODecompressor::Process().
|
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().
|
private |
Pointer to input buffer.
Definition at line 634 of file lzo.hpp.
Referenced by CLZOCompressor::CompressCache(), CLZODecompressor::DecompressCache(), CLZOCompressor::Process(), CLZODecompressor::Process(), and CLZOBuffer::ResetBuffer().
|
protected |
Entry index in the archive.
Definition at line 160 of file archive_.hpp.
Referenced by CArchiveEntryInfo::GetIndex(), CArchiveEntryInfo::operator==(), and CArchiveEntryInfo::Reset().
|
protected |
< Initial allocation size for created archive
Definition at line 618 of file archive.hpp.
Referenced by CArchiveMemory::CArchiveMemory(), CArchiveMemory::Create(), and CArchiveMemory::Open().
|
private |
Length of data in the input buffer.
Definition at line 636 of file lzo.hpp.
Referenced by CLZOCompressor::CompressCache(), CLZODecompressor::DecompressCache(), CLZOCompressor::Finish(), CLZODecompressor::Finish(), CLZOCompressor::Process(), CLZODecompressor::Process(), and CLZOBuffer::ResetBuffer().
|
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().
|
private |
|
private |
TRUE if data have gzip format.
Definition at line 735 of file zlib_cloudflare.hpp.
|
private |
Compression level.
Definition at line 343 of file compress.hpp.
Referenced by CCompression::GetLevel(), and CCompression::SetLevel().
|
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().
|
protected |
Link name if type is e{Sym|Hard}Link.
Definition at line 249 of file tar.hpp.
Referenced by CTarEntryInfo::GetLinkName(), CTarEntryInfo::operator==(), CTar::x_Append(), CTar::x_ParsePAXData(), CTar::x_ReadAndProcess(), and CTar::x_ReadEntryInfo().
|
protected |
Archive location (file/memory)
Definition at line 479 of file archive.hpp.
Referenced by CArchiveCompressionFileStream::CArchiveCompressionFileStream(), CArchiveFile::CArchiveFile(), CArchiveMemory::CArchiveMemory(), and CArchive::x_Open().
|
protected |
Archive location (file/memory)
Definition at line 420 of file archive_.hpp.
Referenced by CArchiveZip::Close(), CArchiveZip::CreateFile(), CArchiveZip::CreateFileStream(), CArchiveZip::CreateMemory(), CArchiveZip::FinalizeMemory(), CArchiveZip::OpenFile(), CArchiveZip::OpenFileStream(), and CArchiveZip::OpenMemory().
|
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().
|
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().
|
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().
|
protected |
Processing direction (read/write)
Definition at line 419 of file archive_.hpp.
Referenced by CArchiveZip::Close(), CArchiveZip::CreateFile(), CArchiveZip::CreateFileStream(), CArchiveZip::CreateMemory(), CArchiveZip::ExtractEntryToCallback(), CArchiveZip::ExtractEntryToFileSystem(), CArchiveZip::ExtractEntryToMemory(), CArchiveZip::FinalizeMemory(), CArchiveZip::GetEntryInfo(), CArchiveZip::GetNumEntries(), CArchiveZip::OpenFile(), CArchiveZip::OpenFileStream(), CArchiveZip::OpenMemory(), and CArchiveZip::TestEntry().
|
protected |
File open mode.
Definition at line 406 of file compress.hpp.
|
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().
|
protected |
|
protected |
I/O mode (read/write).
Definition at line 631 of file zlib_cloudflare.hpp.
|
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().
|
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().
|
protected |
Entry name.
Definition at line 163 of file archive_.hpp.
Referenced by CArchive::AppendFileFromMemory(), CArchiveEntryInfo::GetName(), CArchiveEntryInfo::operator==(), CArchive::x_Append(), and CArchive::x_ReadAndProcess().
|
protected |
Entry name.
Definition at line 248 of file tar.hpp.
Referenced by CTarUserEntryInfo::CTarUserEntryInfo(), CTarEntryInfo::GetName(), CTarEntryInfo::operator==(), CTar::x_Append(), CTar::x_Backspace(), CTar::x_Flush(), CTar::x_Open(), CTar::x_ParsePAXData(), CTar::x_ReadAndProcess(), and CTar::x_ReadEntryInfo().
|
private |
|
private |
TRUE if needed to check to file header.
Definition at line 734 of file zlib_cloudflare.hpp.
|
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().
|
private |
|
private |
Is true if needed to write a file header.
Definition at line 690 of file zlib_cloudflare.hpp.
|
protected |
What was it opened for.
Definition at line 485 of file archive.hpp.
Referenced by CArchive::Close(), CArchiveCompressionFileStream::Create(), CArchiveCompressionFileStream::Open(), and CArchive::x_Open().
|
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().
|
private |
Pointer to begin of data in out buffer.
Definition at line 639 of file lzo.hpp.
Referenced by CLZOCompressor::CompressCache(), CLZODecompressor::DecompressCache(), CLZOCompressor::Finish(), CLZODecompressor::Finish(), CLZOCompressor::Flush(), CLZODecompressor::Flush(), CLZOCompressor::Process(), CLZODecompressor::Process(), and CLZOBuffer::ResetBuffer().
|
private |
Pointer to output buffer.
Definition at line 637 of file lzo.hpp.
Referenced by CLZOCompressor::CompressCache(), CLZODecompressor::DecompressCache(), CLZOCompressor::Flush(), CLZODecompressor::Flush(), and CLZOBuffer::ResetBuffer().
|
private |
Pointer to end of data in out buffer.
Definition at line 640 of file lzo.hpp.
Referenced by CLZOCompressor::CompressCache(), CLZODecompressor::DecompressCache(), CLZOCompressor::Finish(), CLZODecompressor::Finish(), CLZOCompressor::Flush(), CLZODecompressor::Flush(), CLZOCompressor::Process(), CLZODecompressor::Process(), and CLZOBuffer::ResetBuffer().
|
private |
Definition at line 564 of file compress.hpp.
|
private |
Size of the output buffer.
Definition at line 638 of file lzo.hpp.
Referenced by CLZOBuffer::CLZOBuffer(), CLZOCompressor::CompressCache(), CLZODecompressor::DecompressCache(), CLZOCompressor::Finish(), CLZOCompressor::Process(), and CLZOBuffer::ResetBuffer().
|
private |
Data ownership.
Definition at line 451 of file compress.hpp.
Referenced by CCompressionDictionary::Free(), and CCompressionDictionary::LoadFromStream().
|
private |
Definition at line 149 of file reader_zlib.hpp.
Referenced by CNlmZipReader::~CNlmZipReader().
|
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().
|
protected |
Compression parameters.
Definition at line 456 of file lzo.hpp.
Referenced by CLZOCompression::CLZOCompression(), CLZOCompression::CompressBlock(), and CLZOCompression::InitCompression().
|
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().
|
protected |
Entry (not data!) position in archive.
Definition at line 254 of file tar.hpp.
Referenced by CTarEntryInfo::GetPosition(), CTarEntryInfo::operator==(), CTar::x_Append(), CTar::x_ParsePAXData(), CTar::x_ReadAndProcess(), CTar::x_ReadEntryInfo(), and CTar::x_WriteEntryInfo().
|
private |
Definition at line 563 of file compress.hpp.
|
private |
Definition at line 148 of file reader_zlib.hpp.
Referenced by CNlmZipReader::Read(), CNlmZipReader::x_Read(), CNlmZipReader::x_ReadZipHeader(), and CNlmZipReader::~CNlmZipReader().
|
private |
Size of the data.
Definition at line 450 of file compress.hpp.
Referenced by CCompressionDictionary::CCompressionDictionary(), CCompressionDictionary::Free(), and CCompressionDictionary::GetSize().
|
private |
Definition at line 97 of file reader_zlib.hpp.
Referenced by CDynamicCharArray::Alloc(), and CDynamicCharArray::At().
|
private |
|
private |
Number of bytes to skip from input stream.
Used to process concatenated .gz files.
Definition at line 736 of file zlib_cloudflare.hpp.
|
private |
Definition at line 69 of file reader_zlib.hpp.
Referenced by CNlmZipBtRdr::Pushback(), and CNlmZipBtRdr::Read().
|
protected |
Direntry-compatible info (as applicable)
Definition at line 161 of file archive_.hpp.
Referenced by CArchiveEntryInfo::GetCreationTime(), CArchiveEntryInfo::GetGroupId(), CArchiveEntryInfo::GetLastAccessTime(), CArchiveEntryInfo::GetMajor(), CArchiveEntryInfo::GetMinor(), CArchiveEntryInfo::GetMode(), CArchiveEntryInfo::GetModificationTime(), CArchiveEntryInfo::GetSize(), CArchiveEntryInfo::GetUserId(), CArchiveEntryInfo::operator==(), CArchiveEntryInfo::Reset(), and CArchive::x_Append().
|
protected |
Direntry-compatible info.
Definition at line 253 of file tar.hpp.
Referenced by CTarEntryInfo::CTarEntryInfo(), CTarUserEntryInfo::CTarUserEntryInfo(), CTarEntryInfo::GetCreationCTime(), CTarEntryInfo::GetCreationTime(), CTarEntryInfo::GetGroupId(), CTarEntryInfo::GetLastAccessCTime(), CTarEntryInfo::GetLastAccessTime(), CTarEntryInfo::GetMajor(), CTarEntryInfo::GetMinor(), CTarEntryInfo::GetMode(), CTarEntryInfo::GetModificationCTime(), CTarEntryInfo::GetModificationTime(), CTarEntryInfo::GetSize(), CTarEntryInfo::GetUserId(), CTarEntryInfo::operator==(), CTar::x_Append(), CTar::x_ExtractEntry(), CTar::x_ParsePAXData(), CTar::x_ReadAndProcess(), and CTar::x_ReadEntryInfo().
|
protected |
|
protected |
[De]compression stream.
Definition at line 602 of file lzo.hpp.
Referenced by CLZOCompressionFile::Close(), CLZOCompressionFile::GetStreamError(), CLZOCompressionFile::Open(), CLZOCompressionFile::Read(), and CLZOCompressionFile::Write().
|
private |
Archive stream (used for all I/O)
Definition at line 778 of file tar.hpp.
Referenced by CTarReader::PendingCount(), CTarReader::Read(), CTar::x_Backspace(), CTar::x_Flush(), CTar::x_Open(), CTar::x_ReadArchive(), CTar::x_Skip(), and CTar::x_WriteArchive().
|
protected |
|
protected |
|
protected |
Compressor stream.
Definition at line 483 of file zlib_cloudflare.hpp.
|
protected |
[De]comression stream.
Definition at line 633 of file zlib_cloudflare.hpp.
|
private |
Position in stream (0-based)
Definition at line 782 of file tar.hpp.
Referenced by CTar::GetCurrentPosition(), CTar::GetNextEntryInfo(), CTarReader::Read(), CTar::x_Append(), CTar::x_AppendStream(), CTar::x_Backspace(), CTar::x_Close(), CTar::x_ExtractPlainFile(), CTar::x_ExtractSparseFile(), CTar::x_Flush(), CTar::x_Open(), CTar::x_ReadAndProcess(), CTar::x_ReadArchive(), CTar::x_ReadEntryInfo(), CTar::x_ReadLine(), CTar::x_Skip(), CTar::x_WriteArchive(), and CTar::x_WriteEntryInfo().
|
protected |
Type.
Definition at line 162 of file archive_.hpp.
Referenced by CArchive::AppendFileFromMemory(), CArchiveEntryInfo::GetMajor(), CArchiveEntryInfo::GetMinor(), CArchiveEntryInfo::GetType(), CArchiveEntryInfo::operator==(), CArchiveEntryInfo::Reset(), and CArchive::x_Append().
|
private |
Definition at line 70 of file reader_zlib.hpp.
Referenced by CNlmZipBtRdr::Pushback(), and CNlmZipBtRdr::Read().
|
protected |
Type.
Definition at line 247 of file tar.hpp.
Referenced by CTarEntryInfo::GetMajor(), CTarEntryInfo::GetMinor(), CTarEntryInfo::GetType(), CTarEntryInfo::operator==(), CTar::x_Append(), CTar::x_ReadAndProcess(), and CTar::x_ReadEntryInfo().
|
protected |
User name.
Definition at line 165 of file archive_.hpp.
Referenced by CArchiveEntryInfo::GetUserName(), CArchiveEntryInfo::operator==(), and CArchive::x_Append().
|
protected |
User name.
Definition at line 250 of file tar.hpp.
Referenced by CTarEntryInfo::GetUserName(), CTarEntryInfo::operator==(), CTar::x_Append(), CTar::x_ParsePAXData(), CTar::x_ReadAndProcess(), and CTar::x_ReadEntryInfo().
|
protected |
Working memory for compressor.
Definition at line 455 of file lzo.hpp.
Referenced by CLZOCompression::CompressBlock(), and CLZOCompression::InitCompression().
|
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().
| CMask* CArchive::SMask::mask |
Definition at line 408 of file archive.hpp.
Referenced by CArchive::SetMask(), CArchive::x_Append(), and CArchive::x_ReadAndProcess().
| CMask* CTar::SMask::mask |
Definition at line 692 of file tar.hpp.
Referenced by CTar::SetMask(), and CTar::x_ReadAndProcess().
| time_t CZipCloudflareCompression::SFileInfo::mtime |
Definition at line 352 of file zlib_cloudflare.hpp.
| string CZipCloudflareCompression::SFileInfo::name |
Definition at line 350 of file zlib_cloudflare.hpp.
| EOwnership CArchive::SMask::owned |
Definition at line 410 of file archive.hpp.
Referenced by CArchive::SetMask().
| EOwnership CTar::SMask::owned |
Definition at line 694 of file tar.hpp.
Referenced by CTar::SetMask().
|
friend |
Definition at line 170 of file archive_.hpp.
|
friend |
Definition at line 171 of file archive_.hpp.
|
friend |
Definition at line 567 of file compress.hpp.
|
friend |
Definition at line 349 of file compress.hpp.
|
friend |
Definition at line 568 of file compress.hpp.
|
friend |
Definition at line 569 of file compress.hpp.
|
friend |
|
friend |
|
friend |
Definition at line 798 of file tar.hpp.
Referenced by CTar::Extract(), and CTar::GetNextEntryData().