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

Search Toolkit Book for CArchiveCompressionFileStream

CArchiveCompressionFileStream – file stream/descriptor based compression stream archive. More...

#include <util/compress/archive.hpp>

+ Inheritance diagram for CArchiveCompressionFileStream:
+ Collaboration diagram for CArchiveCompressionFileStream:

Public Member Functions

 CArchiveCompressionFileStream (EFormat format, int fd)
 Constructor for stream-based archive. More...
 
 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 (void)
 Destructor. More...
 
virtual void Create (void)
 Create a new empty archive. More...
 
virtual void Close (void)
 Close archive. More...
 
- Public Member Functions inherited from CArchive
virtual ~CArchive (void)
 Destructor. More...
 
virtual unique_ptr< TEntriesList (void)
 Get information about archive entries. More...
 
virtual unique_ptr< TEntriesTest (void)
 Verify archive integrity. More...
 
virtual unique_ptr< TEntriesExtract (void)
 Extract the entire archive. More...
 
virtual void 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 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 ExtractFileToCallback (const CArchiveEntryInfo &info, IArchive::Callback_Write callback)
 Extract single file entry using user-defined callback. More...
 
virtual unique_ptr< TEntriesAppend (const string &path, ELevel level=CCompression::eLevel_Default, const string &comment=kEmptyStr)
 Append an entry to the archive. More...
 
virtual unique_ptr< CArchive::TEntriesAppendFileFromMemory (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 GetFlags (void) const
 Get flags. More...
 
virtual void SetFlags (TFlags flags)
 Set flags. More...
 
virtual const stringGetBaseDir (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 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 SetMask (CMask *mask, EOwnership own=eNoOwnership, EMaskType type=eFullPathMask, NStr::ECase acase=NStr::eNocase)
 Set name mask for processing. More...
 
void UnsetMask (EMaskType type)
 Unset name mask for processing. More...
 
void UnsetMask (void)
 
bool HaveSupport (ESupportFeature feature, int param=0)
 Check that current archive format have support for specific features. More...
 

Protected Member Functions

virtual void Open (EAction action)
 Open the archive for specified action. More...
 
- Protected Member Functions inherited from CArchive
 CArchive (EFormat format)
 Construct an archive object of specified format. More...
 
virtual bool Checkpoint (const CArchiveEntryInfo &, EAction)
 Return false to skip the current entry when processing. More...
 
virtual void SkipEntry (void)
 Process current entry (List/Test/Extract/Append) More...
 
virtual void TestEntry (void)
 
virtual void ExtractEntry (const CDirEntry &dst)
 
virtual void AppendEntry (const string &path, ELevel level)
 
void x_Open (EAction action)
 
unique_ptr< TEntriesx_ReadAndProcess (EAction action)
 
unique_ptr< TEntriesx_Append (const string &path, ELevel level, const string &comment, const TEntries *toc=NULL)
 
bool x_AppendEntry (const string &path, ELevel level=CCompression::eLevel_Default)
 
void x_ExtractEntry (const TEntries *prev_entries)
 
void x_RestoreAttrs (const CArchiveEntryInfo &info, const CDirEntry *dst=NULL) const
 
CArchiveoperator= (const CArchive &)
 
 CArchive (const CArchive &)
 

Protected Attributes

FILE * m_FileStream
 File stream, can be based on m_fd. More...
 
int m_fd
 File/socket descriptor. More...
 
- Protected Attributes inherited from CArchive
unique_ptr< IArchivem_Archive
 Pointer to interface to EFormat-specific archive support. More...
 
EFormat m_Format
 Archive format. More...
 
IArchive::ELocation m_Location
 Archive location (file/memory) More...
 
TFlags m_Flags
 Bitwise OR of flags. More...
 
string m_BaseDir
 Base directory for relative paths. More...
 
CArchiveEntryInfo m_Current
 Information about current entry being processed. More...
 
SMask m_MaskFullPath
 Set of masks for operations (full path) More...
 
SMask m_MaskPattern
 Set of masks for operations (path components) More...
 
EOpenMode m_OpenMode
 What was it opened for. More...
 
bool m_Modified
 True after at least one write. More...
 

Private Member Functions

CArchiveCompressionFileStreamoperator= (const CArchiveCompressionFileStream &)
 
 CArchiveCompressionFileStream (const CArchiveCompressionFileStream &)
 

Additional Inherited Members

- Public Types inherited from CArchive
enum  EFormat { eZip }
 Archive formats. More...
 
enum  EFlags {
  fOverwrite = (1<<3) , fUpdate = (1<<4) | fOverwrite , fBackup = (1<<5) | fOverwrite , fEqualTypes = (1<<6) ,
  fPreserveOwner = (1<<7) , fPreserveMode = (1<<8) , fPreserveTime = (1<<9) , fPreserveAll = fPreserveOwner | fPreserveMode | fPreserveTime ,
  fFollowLinks = (1<<2) , fSkipUnsupported = (1<<15) , fDefault = fOverwrite | fPreserveAll
}
 General flags. More...
 
enum  EMaskType { eFullPathMask , ePatternMask }
 
enum  ESupportFeature { eFeature_Type , eFeature_AbsolutePath , eFeature_FileStream }
 
typedef CCompression::ELevel ELevel
 
typedef unsigned int TFlags
 Bitwise OR of EFlags. More...
 
typedef list< CArchiveEntryInfoTEntries
 Define a list of entries. More...
 
- Protected Types inherited from CArchive
enum  EOpenMode { eNone = 0 , eRO = 1 , eWO = 2 , eRW = eRO | eWO }
 Archive open mode. More...
 
enum  EAction {
  eUndefined = eNone , eCreate = (1 << 8) | eWO , eAppend = (1 << 9) | eWO , eList = (1 << 10) | eRO ,
  eUpdate = eList | eAppend , eExtract = (1 << 11) | eRO , eTest = eList | eExtract
}
 Action, performed on the archive. More...
 

Detailed Description

CArchiveCompressionFileStream – file stream/descriptor based compression stream archive.

Allow to stream compressed data to specified already opened FILE*-based file stream or file/socket descriptor. Only allowed operations are:

Throws exceptions on errors.

Definition at line 642 of file archive.hpp.


The documentation for this class was generated from the following files:
Modified on Sun Mar 03 03:11:34 2024 by modify_doxy.py rev. 669887