XRootD
Loading...
Searching...
No Matches
XrdZip::ZIP64_EOCD Struct Reference

#include <XrdZipZIP64EOCD.hh>

Collaboration diagram for XrdZip::ZIP64_EOCD:

Public Member Functions

 ZIP64_EOCD (const char *buffer)
 Constructor from a buffer.
 ZIP64_EOCD (uint64_t cdoff, uint32_t cdcnt, uint32_t cdsize)
 Constructor from last LFH + CDFH.
void Serialize (buffer_t &buffer)
 Serialize the object into a buffer.
std::string ToString ()
 Convert the ZIP64EOCD into a string for logging purposes.

Public Attributes

uint64_t cdOffset
uint64_t cdSize
std::string extensibleData
uint64_t extensibleDataLength
uint16_t minZipVersion
uint64_t nbCdRec
uint64_t nbCdRecD
uint32_t nbDisk
uint32_t nbDiskCd
uint64_t zip64EocdSize
uint64_t zip64EocdTotalSize
uint16_t zipVersion

Static Public Attributes

static const uint16_t zip64EocdBaseSize = 56
static const uint32_t zip64EocdSign = 0x06064b50

Detailed Description

A data structure representing the ZIP64 extension to End of Central Directory record

Definition at line 23 of file XrdZipZIP64EOCD.hh.

Constructor & Destructor Documentation

◆ ZIP64_EOCD() [1/2]

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

Constructor from a buffer.

Definition at line 28 of file XrdZipZIP64EOCD.hh.

28 :
30 {
31 zip64EocdSize = to<uint64_t>(buffer + 4);
32 zipVersion = to<uint16_t>(buffer + 12);
33 minZipVersion = to<uint16_t>(buffer + 14);
34 nbDisk = to<uint32_t>(buffer + 16);
35 nbDiskCd = to<uint32_t>(buffer + 20);
36 nbCdRecD = to<uint64_t>(buffer + 24);
37 nbCdRec = to<uint64_t>(buffer + 32);
38 cdSize = to<uint64_t>(buffer + 40);
39 cdOffset = to<uint64_t>(buffer + 48);
40
42 }
static INT to(const char *buffer)
static const uint16_t zip64EocdBaseSize

References cdOffset, cdSize, extensibleDataLength, minZipVersion, nbCdRec, nbCdRecD, nbDisk, nbDiskCd, XrdZip::to(), zip64EocdBaseSize, zip64EocdSize, zip64EocdTotalSize, and zipVersion.

Here is the call graph for this function:

◆ ZIP64_EOCD() [2/2]

XrdZip::ZIP64_EOCD::ZIP64_EOCD ( uint64_t cdoff,
uint32_t cdcnt,
uint32_t cdsize )
inline

Constructor from last LFH + CDFH.

Definition at line 47 of file XrdZipZIP64EOCD.hh.

47 :
48 zipVersion( ( 3 << 8 ) | 63 ),
49 minZipVersion( 45 ),
50 nbDisk( 0 ),
51 nbDiskCd( 0 ),
53 {
54 nbCdRec = cdcnt;
55 nbCdRecD = cdcnt;
56 cdSize = cdsize;
57 cdOffset = cdoff;
58
61 }

References cdOffset, cdSize, extensibleDataLength, minZipVersion, nbCdRec, nbCdRecD, nbDisk, nbDiskCd, zip64EocdBaseSize, zip64EocdSize, zip64EocdTotalSize, and zipVersion.

Member Function Documentation

◆ Serialize()

void XrdZip::ZIP64_EOCD::Serialize ( buffer_t & buffer)
inline

Serialize the object into a buffer.

Definition at line 66 of file XrdZipZIP64EOCD.hh.

67 {
68 copy_bytes( zip64EocdSign, buffer );
69 copy_bytes( zip64EocdSize, buffer );
70 copy_bytes( zipVersion, buffer );
71 copy_bytes( minZipVersion, buffer );
72 copy_bytes( nbDisk, buffer );
73 copy_bytes( nbDiskCd, buffer );
74 copy_bytes( nbCdRecD, buffer );
75 copy_bytes( nbCdRec, buffer );
76 copy_bytes( cdSize, buffer );
77 copy_bytes( cdOffset, buffer );
78
79 std::copy( extensibleData.begin(), extensibleData.end(), std::back_inserter( buffer ) );
80 }
static void copy_bytes(const INT value, buffer_t &buffer)
static const uint32_t zip64EocdSign

References cdOffset, cdSize, XrdZip::copy_bytes(), extensibleData, minZipVersion, nbCdRec, nbCdRecD, nbDisk, nbDiskCd, zip64EocdSign, zip64EocdSize, and zipVersion.

Here is the call graph for this function:

◆ ToString()

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

Convert the ZIP64EOCD into a string for logging purposes.

Definition at line 85 of file XrdZipZIP64EOCD.hh.

86 {
87 std::stringstream ss;
88 ss << "{zip64EocdSize=" << zip64EocdSize;
89 ss << ";zipVersion=" << zipVersion;
90 ss << ";minZipVersion=" << minZipVersion;
91 ss << ";nbDisk=" << nbDisk;
92 ss << ";nbDiskCd=" << nbDiskCd;
93 ss << ";nbCdRecD=" << nbCdRecD;
94 ss << ";nbCdRec=" << nbCdRec;
95 ss << ";cdSize=" << cdSize;
96 ss << ";cdOffset=" << cdOffset;
97 ss << ";extensibleData=" << extensibleData;
98 ss << ";extensibleDataLength" << extensibleDataLength << "}";
99 return ss.str();
100 }

References cdOffset, cdSize, extensibleData, extensibleDataLength, minZipVersion, nbCdRec, nbCdRecD, nbDisk, nbDiskCd, zip64EocdSize, and zipVersion.

Member Data Documentation

◆ cdOffset

uint64_t XrdZip::ZIP64_EOCD::cdOffset

◆ cdSize

uint64_t XrdZip::ZIP64_EOCD::cdSize

◆ extensibleData

std::string XrdZip::ZIP64_EOCD::extensibleData

Definition at line 111 of file XrdZipZIP64EOCD.hh.

Referenced by Serialize(), and ToString().

◆ extensibleDataLength

uint64_t XrdZip::ZIP64_EOCD::extensibleDataLength

Definition at line 112 of file XrdZipZIP64EOCD.hh.

Referenced by ZIP64_EOCD(), ZIP64_EOCD(), and ToString().

◆ minZipVersion

uint16_t XrdZip::ZIP64_EOCD::minZipVersion

Definition at line 104 of file XrdZipZIP64EOCD.hh.

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

◆ nbCdRec

uint64_t XrdZip::ZIP64_EOCD::nbCdRec

Definition at line 108 of file XrdZipZIP64EOCD.hh.

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

◆ nbCdRecD

uint64_t XrdZip::ZIP64_EOCD::nbCdRecD

Definition at line 107 of file XrdZipZIP64EOCD.hh.

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

◆ nbDisk

uint32_t XrdZip::ZIP64_EOCD::nbDisk

Definition at line 105 of file XrdZipZIP64EOCD.hh.

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

◆ nbDiskCd

uint32_t XrdZip::ZIP64_EOCD::nbDiskCd

Definition at line 106 of file XrdZipZIP64EOCD.hh.

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

◆ zip64EocdBaseSize

const uint16_t XrdZip::ZIP64_EOCD::zip64EocdBaseSize = 56
static

Definition at line 119 of file XrdZipZIP64EOCD.hh.

Referenced by ZIP64_EOCD(), and ZIP64_EOCD().

◆ zip64EocdSign

const uint32_t XrdZip::ZIP64_EOCD::zip64EocdSign = 0x06064b50
static

Definition at line 118 of file XrdZipZIP64EOCD.hh.

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

◆ zip64EocdSize

uint64_t XrdZip::ZIP64_EOCD::zip64EocdSize

Definition at line 102 of file XrdZipZIP64EOCD.hh.

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

◆ zip64EocdTotalSize

uint64_t XrdZip::ZIP64_EOCD::zip64EocdTotalSize

Definition at line 113 of file XrdZipZIP64EOCD.hh.

Referenced by ZIP64_EOCD(), and ZIP64_EOCD().

◆ zipVersion

uint16_t XrdZip::ZIP64_EOCD::zipVersion

Definition at line 103 of file XrdZipZIP64EOCD.hh.

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


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