Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TZIPFile Class Reference

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.

Definition at line 20 of file TZIPFile.h.

Public Member Functions

 TZIPFile ()
 Default ctor.
 
 TZIPFile (const char *archive, const char *member, TFile *file)
 Specify the archive name and member name.
 
virtual ~TZIPFile ()
 
TClassIsA () const override
 
Int_t OpenArchive () override
 Open archive and read end-header and directory.
 
void Print (Option_t *option="") const override
 Pretty print ZIP archive members.
 
Int_t SetCurrentMember () override
 Find the desired member in the member array and make it the current member.
 
void Streamer (TBuffer &) override
 Stream an object of class TObject.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TArchiveFile
 TArchiveFile ()
 
 TArchiveFile (const char *archive, const char *member, TFile *file)
 Specify the archive name and member name.
 
virtual ~TArchiveFile ()
 Dtor.
 
const char * GetArchiveName () const
 
TArchiveMemberGetMember () const
 
Long64_t GetMemberFilePosition () const
 Return position in archive of current member.
 
Int_t GetMemberIndex () const
 
const char * GetMemberName () const
 
TObjArrayGetMembers () const
 
Int_t GetNumberOfMembers () const
 Returns number of members in archive.
 
virtual Int_t SetMember (const char *member)
 Explicitely make the specified member the current member.
 
virtual Int_t SetMember (Int_t idx)
 Explicitely make the member with the specified index the current member.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility.
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method.
 
virtual void Copy (TObject &object) const
 Copy this to obj.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual const char * GetName () const
 Returns name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object.
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
virtual ULong_t Hash () const
 Return hash value for this object.
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 IsDestructed.
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout.
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification.
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *vp)
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TArchiveFile
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static TArchiveFileOpen (const char *url, TFile *file)
 Return proper archive file handler depending on passed url.
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 

Protected Types

enum  EZIPConstants {
  kARCHIVE_VERSION = 45 , kDIR_HEADER_MAGIC = 0x02014b50 , kENTRY_HEADER_MAGIC = 0x04034b50 , kEND_HEADER_MAGIC = 0x06054b50 ,
  kZIP64_EDR_HEADER_MAGIC = 0x06064b50 , kZIP64_EDL_HEADER_MAGIC = 0x07064b50 , kZIP64_EXTENDED_MAGIC = 0x0001 , kZIP_MAGIC_LEN = 4 ,
  kMAX_VAR_LEN = 0xffff , kMAX_SIZE = 0xffffffff , kDIR_MAGIC_OFF = 0 , kDIR_VMADE_OFF = 4 ,
  kDIR_VMADE_LEN = 2 , kDIR_VREQD_OFF = 6 , kDIR_VREQD_LEN = 2 , kDIR_FLAG_OFF = 8 ,
  kDIR_FLAG_LEN = 2 , kDIR_METHOD_OFF = 10 , kDIR_METHOD_LEN = 2 , kDIR_DATE_OFF = 12 ,
  kDIR_DATE_LEN = 4 , kDIR_CRC32_OFF = 16 , kDIR_CRC32_LEN = 4 , kDIR_CSIZE_OFF = 20 ,
  kDIR_CSIZE_LEN = 4 , kDIR_USIZE_OFF = 24 , kDIR_USIZE_LEN = 4 , kDIR_NAMELEN_OFF = 28 ,
  kDIR_NAMELEN_LEN = 2 , kDIR_EXTRALEN_OFF = 30 , kDIR_EXTRALEN_LEN = 2 , kDIR_COMMENTLEN_OFF = 32 ,
  kDIR_COMMENTLEN_LEN = 2 , kDIR_DISK_START_OFF = 34 , kDIR_DISK_START_LEN = 2 , kDIR_INT_ATTR_OFF = 36 ,
  kDIR_INT_ATTR_LEN = 2 , kDIR_EXT_ATTR_OFF = 38 , kDIR_EXT_ATTR_LEN = 4 , kDIR_ENTRY_POS_OFF = 42 ,
  kDIR_ENTRY_POS_LEN = 4 , kDIR_HEADER_SIZE = 46 , kZIP64_EDR_MAGIC_OFF = 0 , kZIP64_EDR_SIZE_OFF = 4 ,
  kZIP64_EDR_SIZE_LEN = 8 , kZIP64_EDR_VERS_MADE_OFF = 12 , kZIP64_EDR_VERS_MADE_LEN = 2 , kZIP64_EDR_VERS_EXT_OFF = 14 ,
  kZIP64_EDR_VERS_EXT_LEN = 2 , kZIP64_EDR_DISK_OFF = 16 , kZIP64_EDR_DISK_LEN = 4 , kZIP64_EDR_DIR_DISK_OFF = 20 ,
  kZIP64_EDR_DIR_DISK_LEN = 4 , kZIP64_EDR_DISK_HDRS_OFF = 24 , kZIP64_EDR_DISK_HDRS_LEN = 8 , kZIP64_EDR_TOTAL_HDRS_OFF = 32 ,
  kZIP64_EDR_TOTAL_HDRS_LEN = 8 , kZIP64_EDR_DIR_SIZE_OFF = 40 , kZIP64_EDR_DIR_SIZE_LEN = 8 , kZIP64_EDR_DIR_OFFSET_OFF = 48 ,
  kZIP64_EDR_DIR_OFFSET_LEN = 8 , kZIP64_EDR_HEADER_SIZE = 56 , kZIP64_EDL_MAGIC_OFF = 0 , kZIP64_EDL_DISK_OFF = 4 ,
  kZIP64_EDL_DISK_LEN = 4 , kZIP64_EDL_REC_OFFSET_OFF = 8 , kZIP64_EDL_REC_OFFSET_LEN = 8 , kZIP64_EDL_TOTAL_DISK_OFF = 16 ,
  kZIP64_EDL_TOTAL_DISK_LEN = 4 , kZIP64_EDL_HEADER_SIZE = 20 , kEND_MAGIC_OFF = 0 , kEND_DISK_OFF = 4 ,
  kEND_DISK_LEN = 2 , kEND_DIR_DISK_OFF = 6 , kEND_DIR_DISK_LEN = 2 , kEND_DISK_HDRS_OFF = 8 ,
  kEND_DISK_HDRS_LEN = 2 , kEND_TOTAL_HDRS_OFF = 10 , kEND_TOTAL_HDRS_LEN = 2 , kEND_DIR_SIZE_OFF = 12 ,
  kEND_DIR_SIZE_LEN = 4 , kEND_DIR_OFFSET_OFF = 16 , kEND_DIR_OFFSET_LEN = 4 , kEND_COMMENTLEN_OFF = 20 ,
  kEND_COMMENTLEN_LEN = 2 , kEND_HEADER_SIZE = 22 , kENTRY_MAGIC_OFF = 0 , kENTRY_VREQD_OFF = 4 ,
  kENTRY_VREQD_LEN = 2 , kENTRY_FLAG_OFF = 6 , kENTRY_FLAG_LEN = 2 , kENTRY_METHOD_OFF = 8 ,
  kENTRY_METHOD_LEN = 2 , kENTRY_DATE_OFF = 10 , kENTRY_DATE_LEN = 4 , kENTRY_CRC32_OFF = 14 ,
  kENTRY_CRC32_LEN = 4 , kENTRY_CSIZE_OFF = 18 , kENTRY_CSIZE_LEN = 4 , kENTRY_USIZE_OFF = 22 ,
  kENTRY_USIZE_LEN = 4 , kENTRY_NAMELEN_OFF = 26 , kENTRY_NAMELEN_LEN = 2 , kENTRY_EXTRALEN_OFF = 28 ,
  kENTRY_EXTRALEN_LEN = 2 , kENTRY_HEADER_SIZE = 30 , kZIP64_EXTENDED_MAGIC_OFF = 0 , kZIP64_EXTENDED_MAGIC_LEN = 2 ,
  kZIP64_EXTENDED_SIZE_OFF = 2 , kZIP64_EXTENDED_SIZE_LEN = 2 , kZIP64_EXTENDED_USIZE_OFF = 4 , kZIP64_EXTENDED_USIZE_LEN = 8 ,
  kZIP64_EXTENTED_CSIZE_OFF = 12 , kZIP64_EXTENDED_CSIZE_LEN = 8 , kZIP64_EXTENDED_HDR_OFFSET_OFF = 20 , kZIP64_EXTENDED_HDR_OFFSET_LEN = 8 ,
  kZIP64_EXTENDED_DISK_OFF = 28 , kZIP64_EXTENDED_DISK_LEN = 4 , kZIP64_EXTENDED_SIZE = 32 , kSTORED = 0 ,
  kDEFLATED = 8
}
 ZIP archive constants. More...
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = (1ULL << ( 3 )) }
 

Protected Member Functions

 TZIPFile (const TZIPFile &)=delete
 
Int_t DecodeZip64ExtendedExtraField (TZIPMember *m, Bool_t global=kTRUE)
 Decode the Zip64 extended extra field.
 
Long64_t FindEndHeader ()
 Find the end header of the ZIP archive. Returns 0 in case of error.
 
UInt_t Get (const void *buffer, Int_t bytes)
 Read a "bytes" long little-endian integer value from "buffer".
 
ULong64_t Get64 (const void *buffer, Int_t bytes)
 Read a 8 byte long little-endian integer value from "buffer".
 
TZIPFileoperator= (const TZIPFile &)=delete
 
Int_t ReadDirectory ()
 Read the directory of the ZIP archive.
 
Int_t ReadEndHeader (Long64_t pos)
 Read the end header of the ZIP archive including the archive comment at the current file position.
 
Int_t ReadMemberHeader (TZIPMember *member)
 Read the member header of the ZIP archive.
 
Long64_t ReadZip64EndLocator (Long64_t pos)
 Read Zip64 end of central directory locator.
 
Int_t ReadZip64EndRecord (Long64_t pos)
 Read Zip64 end of central directory record.
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected).
 
void MakeZombie ()
 

Protected Attributes

TString fComment
 Archive comment.
 
Long64_t fDirOffset
 Central directory offset (from the beginning of the archive)
 
Long64_t fDirPos
 Central directory position.
 
Long64_t fDirSize
 Central directory size.
 
- Protected Attributes inherited from TArchiveFile
TString fArchiveName
 Archive file name.
 
TArchiveMemberfCurMember
 Current archive member.
 
TFilefFile
 File stream used to access the archive.
 
Int_t fMemberIndex
 Index of sub-file in archive.
 
TString fMemberName
 Sub-file name.
 
TObjArrayfMembers
 Members in this archive.
 

Additional Inherited Members

- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = (1ULL << ( 0 )) , kOverwrite = (1ULL << ( 1 )) , kWriteDelete = (1ULL << ( 2 )) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = (1ULL << ( 3 )) }
 
enum  EStatusBits {
  kCanDelete = (1ULL << ( 0 )) , kMustCleanup = (1ULL << ( 3 )) , kIsReferenced = (1ULL << ( 4 )) , kHasUUID = (1ULL << ( 5 )) ,
  kCannotPick = (1ULL << ( 6 )) , kNoContextMenu = (1ULL << ( 8 )) , kInvalidObject = (1ULL << ( 13 ))
}
 
- Static Protected Member Functions inherited from TArchiveFile
static Bool_t ParseUrl (const char *url, TString &archive, TString &member, TString &type)
 Try to determine if url contains an anchor specifying an archive member.
 

#include <TZIPFile.h>

Inheritance diagram for TZIPFile:
[legend]

Member Enumeration Documentation

◆ EZIPConstants

enum TZIPFile::EZIPConstants
protected

ZIP archive constants.

Enumerator
kARCHIVE_VERSION 
kDIR_HEADER_MAGIC 
kENTRY_HEADER_MAGIC 
kEND_HEADER_MAGIC 
kZIP64_EDR_HEADER_MAGIC 
kZIP64_EDL_HEADER_MAGIC 
kZIP64_EXTENDED_MAGIC 

Zip64 Extended Information Extra Field.

kZIP_MAGIC_LEN 

Length of magic's.

kMAX_VAR_LEN 

Max variable-width field length.

kMAX_SIZE 

Max size of things.

kDIR_MAGIC_OFF 
kDIR_VMADE_OFF 
kDIR_VMADE_LEN 
kDIR_VREQD_OFF 
kDIR_VREQD_LEN 
kDIR_FLAG_OFF 
kDIR_FLAG_LEN 
kDIR_METHOD_OFF 
kDIR_METHOD_LEN 
kDIR_DATE_OFF 
kDIR_DATE_LEN 
kDIR_CRC32_OFF 
kDIR_CRC32_LEN 
kDIR_CSIZE_OFF 
kDIR_CSIZE_LEN 
kDIR_USIZE_OFF 
kDIR_USIZE_LEN 
kDIR_NAMELEN_OFF 
kDIR_NAMELEN_LEN 
kDIR_EXTRALEN_OFF 
kDIR_EXTRALEN_LEN 
kDIR_COMMENTLEN_OFF 
kDIR_COMMENTLEN_LEN 
kDIR_DISK_START_OFF 
kDIR_DISK_START_LEN 
kDIR_INT_ATTR_OFF 
kDIR_INT_ATTR_LEN 
kDIR_EXT_ATTR_OFF 
kDIR_EXT_ATTR_LEN 
kDIR_ENTRY_POS_OFF 
kDIR_ENTRY_POS_LEN 
kDIR_HEADER_SIZE 
kZIP64_EDR_MAGIC_OFF 
kZIP64_EDR_SIZE_OFF 
kZIP64_EDR_SIZE_LEN 
kZIP64_EDR_VERS_MADE_OFF 
kZIP64_EDR_VERS_MADE_LEN 
kZIP64_EDR_VERS_EXT_OFF 
kZIP64_EDR_VERS_EXT_LEN 
kZIP64_EDR_DISK_OFF 
kZIP64_EDR_DISK_LEN 
kZIP64_EDR_DIR_DISK_OFF 
kZIP64_EDR_DIR_DISK_LEN 
kZIP64_EDR_DISK_HDRS_OFF 
kZIP64_EDR_DISK_HDRS_LEN 
kZIP64_EDR_TOTAL_HDRS_OFF 
kZIP64_EDR_TOTAL_HDRS_LEN 
kZIP64_EDR_DIR_SIZE_OFF 
kZIP64_EDR_DIR_SIZE_LEN 
kZIP64_EDR_DIR_OFFSET_OFF 
kZIP64_EDR_DIR_OFFSET_LEN 
kZIP64_EDR_HEADER_SIZE 
kZIP64_EDL_MAGIC_OFF 
kZIP64_EDL_DISK_OFF 
kZIP64_EDL_DISK_LEN 
kZIP64_EDL_REC_OFFSET_OFF 
kZIP64_EDL_REC_OFFSET_LEN 
kZIP64_EDL_TOTAL_DISK_OFF 
kZIP64_EDL_TOTAL_DISK_LEN 
kZIP64_EDL_HEADER_SIZE 
kEND_MAGIC_OFF 
kEND_DISK_OFF 
kEND_DISK_LEN 
kEND_DIR_DISK_OFF 
kEND_DIR_DISK_LEN 
kEND_DISK_HDRS_OFF 
kEND_DISK_HDRS_LEN 
kEND_TOTAL_HDRS_OFF 
kEND_TOTAL_HDRS_LEN 
kEND_DIR_SIZE_OFF 
kEND_DIR_SIZE_LEN 
kEND_DIR_OFFSET_OFF 
kEND_DIR_OFFSET_LEN 
kEND_COMMENTLEN_OFF 
kEND_COMMENTLEN_LEN 
kEND_HEADER_SIZE 
kENTRY_MAGIC_OFF 
kENTRY_VREQD_OFF 
kENTRY_VREQD_LEN 
kENTRY_FLAG_OFF 
kENTRY_FLAG_LEN 
kENTRY_METHOD_OFF 
kENTRY_METHOD_LEN 
kENTRY_DATE_OFF 
kENTRY_DATE_LEN 
kENTRY_CRC32_OFF 
kENTRY_CRC32_LEN 
kENTRY_CSIZE_OFF 
kENTRY_CSIZE_LEN 
kENTRY_USIZE_OFF 
kENTRY_USIZE_LEN 
kENTRY_NAMELEN_OFF 
kENTRY_NAMELEN_LEN 
kENTRY_EXTRALEN_OFF 
kENTRY_EXTRALEN_LEN 
kENTRY_HEADER_SIZE 
kZIP64_EXTENDED_MAGIC_OFF 
kZIP64_EXTENDED_MAGIC_LEN 
kZIP64_EXTENDED_SIZE_OFF 
kZIP64_EXTENDED_SIZE_LEN 
kZIP64_EXTENDED_USIZE_OFF 
kZIP64_EXTENDED_USIZE_LEN 
kZIP64_EXTENTED_CSIZE_OFF 
kZIP64_EXTENDED_CSIZE_LEN 
kZIP64_EXTENDED_HDR_OFFSET_OFF 
kZIP64_EXTENDED_HDR_OFFSET_LEN 
kZIP64_EXTENDED_DISK_OFF 
kZIP64_EXTENDED_DISK_LEN 
kZIP64_EXTENDED_SIZE 
kSTORED 

Stored as is.

kDEFLATED 

Stored using deflate.

Definition at line 39 of file TZIPFile.h.

Constructor & Destructor Documentation

◆ TZIPFile() [1/3]

TZIPFile::TZIPFile ( const TZIPFile )
protecteddelete

◆ TZIPFile() [2/3]

TZIPFile::TZIPFile ( )

Default ctor.

Definition at line 65 of file TZIPFile.cxx.

◆ TZIPFile() [3/3]

TZIPFile::TZIPFile ( const char *  archive,
const char *  member,
TFile file 
)

Specify the archive name and member name.

The member can be a decimal number which allows to access the n-th member.

Definition at line 76 of file TZIPFile.cxx.

◆ ~TZIPFile()

virtual TZIPFile::~TZIPFile ( )
inlinevirtual

Definition at line 137 of file TZIPFile.h.

Member Function Documentation

◆ Class()

static TClass * TZIPFile::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TZIPFile::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TZIPFile::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 144 of file TZIPFile.h.

◆ DeclFileName()

static const char * TZIPFile::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 144 of file TZIPFile.h.

◆ DecodeZip64ExtendedExtraField()

Int_t TZIPFile::DecodeZip64ExtendedExtraField ( TZIPMember m,
Bool_t  global = kTRUE 
)
protected

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.

Definition at line 441 of file TZIPFile.cxx.

◆ FindEndHeader()

Long64_t TZIPFile::FindEndHeader ( )
protected

Find the end header of the ZIP archive. Returns 0 in case of error.

Definition at line 98 of file TZIPFile.cxx.

◆ Get()

UInt_t TZIPFile::Get ( const void *  buffer,
Int_t  bytes 
)
protected

Read a "bytes" long little-endian integer value from "buffer".

Definition at line 514 of file TZIPFile.cxx.

◆ Get64()

ULong64_t TZIPFile::Get64 ( const void *  buffer,
Int_t  bytes 
)
protected

Read a 8 byte long little-endian integer value from "buffer".

Definition at line 535 of file TZIPFile.cxx.

◆ IsA()

TClass * TZIPFile::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TArchiveFile.

Definition at line 144 of file TZIPFile.h.

◆ OpenArchive()

Int_t TZIPFile::OpenArchive ( )
overridevirtual

Open archive and read end-header and directory.

Returns -1 in case of error, 0 otherwise.

Implements TArchiveFile.

Definition at line 88 of file TZIPFile.cxx.

◆ operator=()

TZIPFile & TZIPFile::operator= ( const TZIPFile )
protecteddelete

◆ Print()

void TZIPFile::Print ( Option_t option = "") const
overridevirtual

Pretty print ZIP archive members.

Reimplemented from TObject.

Definition at line 557 of file TZIPFile.cxx.

◆ ReadDirectory()

Int_t TZIPFile::ReadDirectory ( )
protected

Read the directory of the ZIP archive.

Returns -1 in case of error, 0 otherwise.

Definition at line 278 of file TZIPFile.cxx.

◆ ReadEndHeader()

Int_t TZIPFile::ReadEndHeader ( Long64_t  pos)
protected

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.

Definition at line 139 of file TZIPFile.cxx.

◆ ReadMemberHeader()

Int_t TZIPFile::ReadMemberHeader ( TZIPMember member)
protected

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.

Definition at line 404 of file TZIPFile.cxx.

◆ ReadZip64EndLocator()

Long64_t TZIPFile::ReadZip64EndLocator ( Long64_t  pos)
protected

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.

Definition at line 211 of file TZIPFile.cxx.

◆ ReadZip64EndRecord()

Int_t TZIPFile::ReadZip64EndRecord ( Long64_t  pos)
protected

Read Zip64 end of central directory record.

Returns -1 in case of error and 0 in case of success.

Definition at line 246 of file TZIPFile.cxx.

◆ SetCurrentMember()

Int_t TZIPFile::SetCurrentMember ( )
overridevirtual

Find the desired member in the member array and make it the current member.

Returns -1 in case member is not found, 0 otherwise.

Implements TArchiveFile.

Definition at line 486 of file TZIPFile.cxx.

◆ Streamer()

void TZIPFile::Streamer ( TBuffer R__b)
overridevirtual

Stream an object of class TObject.

Reimplemented from TArchiveFile.

◆ StreamerNVirtual()

void TZIPFile::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 144 of file TZIPFile.h.

Member Data Documentation

◆ fComment

TString TZIPFile::fComment
protected

Archive comment.

Definition at line 26 of file TZIPFile.h.

◆ fDirOffset

Long64_t TZIPFile::fDirOffset
protected

Central directory offset (from the beginning of the archive)

Definition at line 25 of file TZIPFile.h.

◆ fDirPos

Long64_t TZIPFile::fDirPos
protected

Central directory position.

Definition at line 23 of file TZIPFile.h.

◆ fDirSize

Long64_t TZIPFile::fDirSize
protected

Central directory size.

Definition at line 24 of file TZIPFile.h.

Libraries for TZIPFile:

The documentation for this class was generated from the following files: