XRootD
XrdZip::ZIP64_EOCDL Struct Reference

A data structure representing the ZIP64 end of central directory locator. More...

#include <XrdZipZIP64EOCDL.hh>

+ Collaboration diagram for XrdZip::ZIP64_EOCDL:

Public Member Functions

 ZIP64_EOCDL (const char *buffer)
 Constructor from a buffer. More...
 
 ZIP64_EOCDL (const EOCD &eocd, const ZIP64_EOCD &zip64Eocd)
 Constructor from EOCD and ZIP64 EOCD. More...
 
void Serialize (buffer_t &buffer)
 Serialize the object into a buffer. More...
 
std::string ToString ()
 Convert the EOCDL into a string for logging purposes. More...
 

Public Attributes

uint32_t nbDiskZip64Eocd
 
uint32_t totalNbDisks
 
uint64_t zip64EocdOffset
 

Static Public Attributes

static const uint32_t zip64EocdlSign = 0x07064b50
 
static const uint16_t zip64EocdlSize = 20
 

Detailed Description

A data structure representing the ZIP64 end of central directory locator.

Definition at line 22 of file XrdZipZIP64EOCDL.hh.

Constructor & Destructor Documentation

◆ ZIP64_EOCDL() [1/2]

XrdZip::ZIP64_EOCDL::ZIP64_EOCDL ( const char *  buffer)
inline

Constructor from a buffer.

Definition at line 27 of file XrdZipZIP64EOCDL.hh.

28  {
29  nbDiskZip64Eocd = to<uint32_t>(buffer + 4);
30  zip64EocdOffset = to<uint64_t>(buffer + 8);
31  totalNbDisks = to<uint32_t>(buffer + 16);
32  }

References nbDiskZip64Eocd, totalNbDisks, and zip64EocdOffset.

◆ ZIP64_EOCDL() [2/2]

XrdZip::ZIP64_EOCDL::ZIP64_EOCDL ( const EOCD eocd,
const ZIP64_EOCD zip64Eocd 
)
inline

Constructor from EOCD and ZIP64 EOCD.

Definition at line 37 of file XrdZipZIP64EOCDL.hh.

37  :
38  nbDiskZip64Eocd( 0 ),
39  totalNbDisks( 1 )
40  {
41  if ( eocd.cdOffset == ovrflw<uint32_t>::value )
42  zip64EocdOffset = zip64Eocd.cdOffset;
43  else
44  zip64EocdOffset = eocd.cdOffset;
45 
46  if ( eocd.cdSize == ovrflw<uint32_t>::value )
47  zip64EocdOffset += zip64Eocd.cdSize;
48  else
49  zip64EocdOffset += eocd.cdSize;
50  }
static const UINT value
Definition: XrdZipUtils.hh:50

References XrdZip::EOCD::cdOffset, XrdZip::ZIP64_EOCD::cdOffset, XrdZip::EOCD::cdSize, XrdZip::ZIP64_EOCD::cdSize, and zip64EocdOffset.

Member Function Documentation

◆ Serialize()

void XrdZip::ZIP64_EOCDL::Serialize ( buffer_t buffer)
inline

Serialize the object into a buffer.

Definition at line 55 of file XrdZipZIP64EOCDL.hh.

56  {
57  copy_bytes( zip64EocdlSign, buffer );
58  copy_bytes( nbDiskZip64Eocd, buffer );
59  copy_bytes( zip64EocdOffset, buffer );
60  copy_bytes( totalNbDisks, buffer );
61  }
static void copy_bytes(const INT value, buffer_t &buffer)
Definition: XrdZipUtils.hh:62
static const uint32_t zip64EocdlSign

References XrdZip::copy_bytes(), nbDiskZip64Eocd, totalNbDisks, zip64EocdlSign, and zip64EocdOffset.

+ Here is the call graph for this function:

◆ ToString()

std::string XrdZip::ZIP64_EOCDL::ToString ( )
inline

Convert the EOCDL into a string for logging purposes.

Definition at line 66 of file XrdZipZIP64EOCDL.hh.

67  {
68  std::stringstream ss;
69  ss << "{nbDiskZip64Eocd=" << nbDiskZip64Eocd;
70  ss << ";zip64EocdOffset=" << zip64EocdOffset;
71  ss << ";totalNbDisks=" << totalNbDisks << "}";
72  return ss.str();
73  }

References nbDiskZip64Eocd, totalNbDisks, and zip64EocdOffset.

Member Data Documentation

◆ nbDiskZip64Eocd

uint32_t XrdZip::ZIP64_EOCDL::nbDiskZip64Eocd

Definition at line 75 of file XrdZipZIP64EOCDL.hh.

Referenced by ZIP64_EOCDL(), Serialize(), and ToString().

◆ totalNbDisks

uint32_t XrdZip::ZIP64_EOCDL::totalNbDisks

Definition at line 77 of file XrdZipZIP64EOCDL.hh.

Referenced by ZIP64_EOCDL(), Serialize(), and ToString().

◆ zip64EocdlSign

const uint32_t XrdZip::ZIP64_EOCDL::zip64EocdlSign = 0x07064b50
static

Definition at line 82 of file XrdZipZIP64EOCDL.hh.

Referenced by XrdCl::ZipArchive::OpenArchive(), and Serialize().

◆ zip64EocdlSize

const uint16_t XrdZip::ZIP64_EOCDL::zip64EocdlSize = 20
static

Definition at line 83 of file XrdZipZIP64EOCDL.hh.

Referenced by XrdCl::ZipArchive::OpenArchive().

◆ zip64EocdOffset

uint64_t XrdZip::ZIP64_EOCDL::zip64EocdOffset

Definition at line 76 of file XrdZipZIP64EOCDL.hh.

Referenced by ZIP64_EOCDL(), Serialize(), and ToString().


The documentation for this struct was generated from the following file: