TZIPFile This class describes a ZIP archive file containing multiple sub-files. Typically the sub-files are ROOT files. Notice that the ROOT files should not be compressed when being added to the ZIP file, since ROOT files are normally already compressed. Such a ZIP file should be created like: zip -n root multi file1.root file2.root which creates a ZIP file multi.zip. A ZIP archive consists of files compressed with the popular ZLIB compression algorithm. The archive format is used among others by PKZip and Info-ZIP. The compression algorithm is also used by GZIP and the PNG graphics standard. The format of the archives is explained briefly below. This class provides an interface to read such archives. A ZIP archive contains a prefix, series of archive members (sub-files), and a central directory. In theory the archive could span multiple disks (or files) with the central directory of the whole archive on the last disk, but this class does not support such multi-part archives. The prefix is only used in self-extracting executable archive files. The members are stored in the archive sequentially, each with a local header followed by the (optionally) compressed data; the local header describes the member, including its file name and compressed and real sizes. The central directory includes the member details again, plus allows an extra member comment to be added. The last member in the central directory is an end marker that can contain a comment for the whole archive. Both the local header and the central directory can also carry extra member-specific data; the data in the local and global parts can be different. The fact that the archive has a global directory makes it efficient and allows for only the reading of the desired data, one does not have to scan through the whole file to find the desired sub-file. The Zip64 extensions are supported so files larger than 2GB can be stored in archives larger than 4 GB. Once the archive has been opened, the client can query the members and read their contents by asking the archive for an offset where the sub-file starts. The members can be accessed in any order.
virtual | ~TZIPFile() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TObject::Clear(Option_t* = "") |
virtual TObject* | TObject::Clone(const char* newname = "") const |
virtual Int_t | TObject::Compare(const TObject* obj) const |
virtual void | TObject::Copy(TObject& object) const |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
const char* | TArchiveFile::GetArchiveName() const |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
virtual const char* | TObject::GetIconName() const |
TArchiveMember* | TArchiveFile::GetMember() const |
Long64_t | TArchiveFile::GetMemberFilePosition() const |
Int_t | TArchiveFile::GetMemberIndex() const |
const char* | TArchiveFile::GetMemberName() const |
TObjArray* | TArchiveFile::GetMembers() const |
virtual const char* | TObject::GetName() const |
Int_t | TArchiveFile::GetNumberOfMembers() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | TObject::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TObject::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TObject::IsSortable() const |
Bool_t | TObject::IsZombie() const |
virtual void | TObject::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual Bool_t | TObject::Notify() |
void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
static TArchiveFile* | TArchiveFile::Open(const char* url, TFile* file) |
virtual Int_t | OpenArchive() |
void | TObject::operator delete(void* ptr) |
void | TObject::operator delete(void* ptr, void* vp) |
void | TObject::operator delete[](void* ptr) |
void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | Print(Option_t* option = "") const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual Int_t | SetCurrentMember() |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
virtual Int_t | TArchiveFile::SetMember(const char* member) |
virtual Int_t | TArchiveFile::SetMember(Int_t idx) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | ShowMembers(TMemberInspector& insp) const |
virtual void | Streamer(TBuffer&) |
void | StreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
TZIPFile() | |
TZIPFile(const char* archive, const char* member, TFile* file) | |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
Int_t | DecodeZip64ExtendedExtraField(TZIPMember* m, Bool_t global = kTRUE) |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
Long64_t | FindEndHeader() |
UInt_t | Get(const void* buffer, Int_t bytes) |
ULong64_t | Get64(const void* buffer, Int_t bytes) |
void | TObject::MakeZombie() |
TZIPFile& | operator=(const TZIPFile&) |
static Bool_t | TArchiveFile::ParseUrl(const char* url, TString& archive, TString& member, TString& type) |
Int_t | ReadDirectory() |
Int_t | ReadEndHeader(Long64_t pos) |
Int_t | ReadMemberHeader(TZIPMember* member) |
Long64_t | ReadZip64EndLocator(Long64_t pos) |
Int_t | ReadZip64EndRecord(Long64_t pos) |
TZIPFile(const TZIPFile&) |
static TObject::<anonymous> | TObject::kBitMask | |
static TObject::EStatusBits | TObject::kCanDelete | |
static TObject::EStatusBits | TObject::kCannotPick | |
static TObject::EStatusBits | TObject::kHasUUID | |
static TObject::EStatusBits | TObject::kInvalidObject | |
static TObject::<anonymous> | TObject::kIsOnHeap | |
static TObject::EStatusBits | TObject::kIsReferenced | |
static TObject::EStatusBits | TObject::kMustCleanup | |
static TObject::EStatusBits | TObject::kNoContextMenu | |
static TObject::<anonymous> | TObject::kNotDeleted | |
static TObject::EStatusBits | TObject::kObjInCanvas | |
static TObject::<anonymous> | TObject::kOverwrite | |
static TObject::<anonymous> | TObject::kSingleKey | |
static TObject::<anonymous> | TObject::kWriteDelete | |
static TObject::<anonymous> | TObject::kZombie |
TString | TArchiveFile::fArchiveName | Archive file name |
TString | fComment | Archive comment |
TArchiveMember* | TArchiveFile::fCurMember | Current archive member |
Long64_t | fDirOffset | Central directory offset (from the beginning of the archive) |
Long64_t | fDirPos | Central directory position |
Long64_t | fDirSize | Central directory size |
TFile* | TArchiveFile::fFile | File stream used to access the archive |
Int_t | TArchiveFile::fMemberIndex | Index of sub-file in archive |
TString | TArchiveFile::fMemberName | Sub-file name |
TObjArray* | TArchiveFile::fMembers | Members in this archive |
static TZIPFile::EZIPConstants | kARCHIVE_VERSION | |
static TZIPFile::EZIPConstants | kDEFLATED | |
static TZIPFile::EZIPConstants | kDIR_COMMENTLEN_LEN | |
static TZIPFile::EZIPConstants | kDIR_COMMENTLEN_OFF | |
static TZIPFile::EZIPConstants | kDIR_CRC32_LEN | |
static TZIPFile::EZIPConstants | kDIR_CRC32_OFF | |
static TZIPFile::EZIPConstants | kDIR_CSIZE_LEN | |
static TZIPFile::EZIPConstants | kDIR_CSIZE_OFF | |
static TZIPFile::EZIPConstants | kDIR_DATE_LEN | |
static TZIPFile::EZIPConstants | kDIR_DATE_OFF | |
static TZIPFile::EZIPConstants | kDIR_DISK_START_LEN | |
static TZIPFile::EZIPConstants | kDIR_DISK_START_OFF | |
static TZIPFile::EZIPConstants | kDIR_ENTRY_POS_LEN | |
static TZIPFile::EZIPConstants | kDIR_ENTRY_POS_OFF | |
static TZIPFile::EZIPConstants | kDIR_EXTRALEN_LEN | |
static TZIPFile::EZIPConstants | kDIR_EXTRALEN_OFF | |
static TZIPFile::EZIPConstants | kDIR_EXT_ATTR_LEN | |
static TZIPFile::EZIPConstants | kDIR_EXT_ATTR_OFF | |
static TZIPFile::EZIPConstants | kDIR_FLAG_LEN | |
static TZIPFile::EZIPConstants | kDIR_FLAG_OFF | |
static TZIPFile::EZIPConstants | kDIR_HEADER_MAGIC | |
static TZIPFile::EZIPConstants | kDIR_HEADER_SIZE | |
static TZIPFile::EZIPConstants | kDIR_INT_ATTR_LEN | |
static TZIPFile::EZIPConstants | kDIR_INT_ATTR_OFF | |
static TZIPFile::EZIPConstants | kDIR_MAGIC_OFF | |
static TZIPFile::EZIPConstants | kDIR_METHOD_LEN | |
static TZIPFile::EZIPConstants | kDIR_METHOD_OFF | |
static TZIPFile::EZIPConstants | kDIR_NAMELEN_LEN | |
static TZIPFile::EZIPConstants | kDIR_NAMELEN_OFF | |
static TZIPFile::EZIPConstants | kDIR_USIZE_LEN | |
static TZIPFile::EZIPConstants | kDIR_USIZE_OFF | |
static TZIPFile::EZIPConstants | kDIR_VMADE_LEN | |
static TZIPFile::EZIPConstants | kDIR_VMADE_OFF | |
static TZIPFile::EZIPConstants | kDIR_VREQD_LEN | |
static TZIPFile::EZIPConstants | kDIR_VREQD_OFF | |
static TZIPFile::EZIPConstants | kEND_COMMENTLEN_LEN | |
static TZIPFile::EZIPConstants | kEND_COMMENTLEN_OFF | |
static TZIPFile::EZIPConstants | kEND_DIR_DISK_LEN | |
static TZIPFile::EZIPConstants | kEND_DIR_DISK_OFF | |
static TZIPFile::EZIPConstants | kEND_DIR_OFFSET_LEN | |
static TZIPFile::EZIPConstants | kEND_DIR_OFFSET_OFF | |
static TZIPFile::EZIPConstants | kEND_DIR_SIZE_LEN | |
static TZIPFile::EZIPConstants | kEND_DIR_SIZE_OFF | |
static TZIPFile::EZIPConstants | kEND_DISK_HDRS_LEN | |
static TZIPFile::EZIPConstants | kEND_DISK_HDRS_OFF | |
static TZIPFile::EZIPConstants | kEND_DISK_LEN | |
static TZIPFile::EZIPConstants | kEND_DISK_OFF | |
static TZIPFile::EZIPConstants | kEND_HEADER_MAGIC | |
static TZIPFile::EZIPConstants | kEND_HEADER_SIZE | |
static TZIPFile::EZIPConstants | kEND_MAGIC_OFF | |
static TZIPFile::EZIPConstants | kEND_TOTAL_HDRS_LEN | |
static TZIPFile::EZIPConstants | kEND_TOTAL_HDRS_OFF | |
static TZIPFile::EZIPConstants | kENTRY_CRC32_LEN | |
static TZIPFile::EZIPConstants | kENTRY_CRC32_OFF | |
static TZIPFile::EZIPConstants | kENTRY_CSIZE_LEN | |
static TZIPFile::EZIPConstants | kENTRY_CSIZE_OFF | |
static TZIPFile::EZIPConstants | kENTRY_DATE_LEN | |
static TZIPFile::EZIPConstants | kENTRY_DATE_OFF | |
static TZIPFile::EZIPConstants | kENTRY_EXTRALEN_LEN | |
static TZIPFile::EZIPConstants | kENTRY_EXTRALEN_OFF | |
static TZIPFile::EZIPConstants | kENTRY_FLAG_LEN | |
static TZIPFile::EZIPConstants | kENTRY_FLAG_OFF | |
static TZIPFile::EZIPConstants | kENTRY_HEADER_MAGIC | |
static TZIPFile::EZIPConstants | kENTRY_HEADER_SIZE | |
static TZIPFile::EZIPConstants | kENTRY_MAGIC_OFF | |
static TZIPFile::EZIPConstants | kENTRY_METHOD_LEN | |
static TZIPFile::EZIPConstants | kENTRY_METHOD_OFF | |
static TZIPFile::EZIPConstants | kENTRY_NAMELEN_LEN | |
static TZIPFile::EZIPConstants | kENTRY_NAMELEN_OFF | |
static TZIPFile::EZIPConstants | kENTRY_USIZE_LEN | |
static TZIPFile::EZIPConstants | kENTRY_USIZE_OFF | |
static TZIPFile::EZIPConstants | kENTRY_VREQD_LEN | |
static TZIPFile::EZIPConstants | kENTRY_VREQD_OFF | |
static TZIPFile::EZIPConstants | kMAX_SIZE | |
static TZIPFile::EZIPConstants | kMAX_VAR_LEN | |
static TZIPFile::EZIPConstants | kSTORED | |
static TZIPFile::EZIPConstants | kZIP64_EDL_DISK_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EDL_DISK_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EDL_HEADER_MAGIC | |
static TZIPFile::EZIPConstants | kZIP64_EDL_HEADER_SIZE | |
static TZIPFile::EZIPConstants | kZIP64_EDL_MAGIC_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EDL_REC_OFFSET_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EDL_REC_OFFSET_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EDL_TOTAL_DISK_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EDL_TOTAL_DISK_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EDR_DIR_DISK_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EDR_DIR_DISK_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EDR_DIR_OFFSET_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EDR_DIR_OFFSET_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EDR_DIR_SIZE_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EDR_DIR_SIZE_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EDR_DISK_HDRS_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EDR_DISK_HDRS_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EDR_DISK_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EDR_DISK_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EDR_HEADER_MAGIC | |
static TZIPFile::EZIPConstants | kZIP64_EDR_HEADER_SIZE | |
static TZIPFile::EZIPConstants | kZIP64_EDR_MAGIC_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EDR_SIZE_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EDR_SIZE_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EDR_TOTAL_HDRS_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EDR_TOTAL_HDRS_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EDR_VERS_EXT_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EDR_VERS_EXT_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EDR_VERS_MADE_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EDR_VERS_MADE_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EXTENDED_CSIZE_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EXTENDED_DISK_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EXTENDED_DISK_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EXTENDED_HDR_OFFSET_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EXTENDED_HDR_OFFSET_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EXTENDED_MAGIC | |
static TZIPFile::EZIPConstants | kZIP64_EXTENDED_MAGIC_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EXTENDED_MAGIC_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EXTENDED_SIZE | |
static TZIPFile::EZIPConstants | kZIP64_EXTENDED_SIZE_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EXTENDED_SIZE_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EXTENDED_USIZE_LEN | |
static TZIPFile::EZIPConstants | kZIP64_EXTENDED_USIZE_OFF | |
static TZIPFile::EZIPConstants | kZIP64_EXTENTED_CSIZE_OFF | |
static TZIPFile::EZIPConstants | kZIP_MAGIC_LEN |
Specify the archive name and member name. The member can be a decimal number which allows to access the n-th member.
Open archive and read end-header and directory. Returns -1 in case of error, 0 otherwise.
Read the end header of the ZIP archive including the archive comment at the current file position. Check that it really was a single-disk archive with all the entries as expected. Most importantly, figure out where the central directory begins. Returns -1 in case of error, 0 otherwise.
Read Zip64 end of central directory locator. Returns -1 in case of error, -2 in case end locator magic is not found (i.e. not a zip64 file) and offset of Zip64 end of central directory record in case of success.
Read Zip64 end of central directory record. Returns -1 in case of error and 0 in case of success.
Read the directory of the ZIP archive. Returns -1 in case of error, 0 otherwise.
Read the member header of the ZIP archive. Sets the position where the data starts in the member object. Returns -1 in case of error, 0 otherwise.
Decode the Zip64 extended extra field. If global is true, decode the extra field coming from the central directory, if false decode the extra field coming from the local file header. Returns -1 in case of error, -2 in case Zip64 extra block was not found and 0 in case of success.
Find the desired member in the member array and make it the current member. Returns -1 in case member is not found, 0 otherwise.