xrootd
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
XrdZip::CDFH Struct Reference

#include <XrdZipCDFH.hh>

Collaboration diagram for XrdZip::CDFH:
Collaboration graph
[legend]

Public Member Functions

 CDFH (LFH *lfh, mode_t mode, uint64_t lfhOffset)
 
 CDFH (const char *buffer, const uint32_t maxSize=0)
 
void ParseExtra (const char *buffer, uint16_t length)
 
void Serialize (buffer_t &buffer)
 Serialize the object into a buffer.
 
bool IsZIP64 () const
 
bool HasDataDescriptor ()
 

Static Public Member Functions

static std::tuple< cdvec_t, cdmap_tParse (const char *buffer, uint32_t bufferSize, uint16_t nbCdRecords)
 
static std::tuple< cdvec_t, cdmap_tParse (const char *&buffer, uint32_t bufferSize)
 
static size_t CalcSize (const cdvec_t &cdvec, uint32_t orgcdsz, uint32_t orgcdcnt)
 
static void Serialize (uint32_t orgcdcnt, const buffer_t &orgcdbuf, const cdvec_t &cdvec, buffer_t &buffer)
 
static uint64_t GetOffset (const CDFH &cdfh)
 

Public Attributes

uint16_t zipVersion
 
uint16_t minZipVersion
 
uint16_t generalBitFlag
 
uint16_t compressionMethod
 
dos_timestmp timestmp
 
uint32_t ZCRC32
 
uint32_t compressedSize
 
uint32_t uncompressedSize
 
uint16_t filenameLength
 
uint16_t extraLength
 
uint16_t commentLength
 
uint16_t nbDisk
 
uint16_t internAttr
 
uint32_t externAttr
 
uint32_t offset
 
std::string filename
 
std::unique_ptr< Extraextra
 
std::string comment
 
uint16_t cdfhSize
 

Static Public Attributes

static const uint32_t cdfhSign = 0x02014b50
 
static const uint16_t cdfhBaseSize = 46
 

Constructor & Destructor Documentation

◆ CDFH() [1/2]

XrdZip::CDFH::CDFH ( LFH lfh,
mode_t  mode,
uint64_t  lfhOffset 
)
inline

◆ CDFH() [2/2]

XrdZip::CDFH::CDFH ( const char *  buffer,
const uint32_t  maxSize = 0 
)
inline

Member Function Documentation

◆ CalcSize()

static size_t XrdZip::CDFH::CalcSize ( const cdvec_t cdvec,
uint32_t  orgcdsz,
uint32_t  orgcdcnt 
)
inlinestatic

References cdfhSize.

◆ GetOffset()

static uint64_t XrdZip::CDFH::GetOffset ( const CDFH cdfh)
inlinestatic

References extra, and offset.

◆ HasDataDescriptor()

bool XrdZip::CDFH::HasDataDescriptor ( )
inline
Returns
: true if the data descriptor flag is on, false otherwise

References XrdZip::DataDescriptor::flag, and generalBitFlag.

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

◆ IsZIP64()

bool XrdZip::CDFH::IsZIP64 ( ) const
inline
Returns
: true if ZIP64 extension is present, false otherwise

References extra.

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

◆ Parse() [1/2]

static std::tuple< cdvec_t, cdmap_t > XrdZip::CDFH::Parse ( const char *&  buffer,
uint32_t  bufferSize 
)
inlinestatic

References cdfhSign, and cdfhSize.

◆ Parse() [2/2]

static std::tuple< cdvec_t, cdmap_t > XrdZip::CDFH::Parse ( const char *  buffer,
uint32_t  bufferSize,
uint16_t  nbCdRecords 
)
inlinestatic

References cdfhBaseSize, cdfhSign, and offset.

◆ ParseExtra()

void XrdZip::CDFH::ParseExtra ( const char *  buffer,
uint16_t  length 
)
inline

◆ Serialize() [1/2]

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

◆ Serialize() [2/2]

static void XrdZip::CDFH::Serialize ( uint32_t  orgcdcnt,
const buffer_t orgcdbuf,
const cdvec_t cdvec,
buffer_t buffer 
)
inlinestatic

References Serialize().

Referenced by Serialize().

Member Data Documentation

◆ cdfhBaseSize

const uint16_t XrdZip::CDFH::cdfhBaseSize = 46
static

Referenced by CDFH(), CDFH(), and Parse().

◆ cdfhSign

const uint32_t XrdZip::CDFH::cdfhSign = 0x02014b50
static

Referenced by Parse(), Parse(), and Serialize().

◆ cdfhSize

uint16_t XrdZip::CDFH::cdfhSize

Referenced by CalcSize(), CDFH(), CDFH(), and Parse().

◆ comment

std::string XrdZip::CDFH::comment

Referenced by Serialize().

◆ commentLength

uint16_t XrdZip::CDFH::commentLength

Referenced by CDFH(), CDFH(), and Serialize().

◆ compressedSize

uint32_t XrdZip::CDFH::compressedSize

◆ compressionMethod

uint16_t XrdZip::CDFH::compressionMethod

◆ externAttr

uint32_t XrdZip::CDFH::externAttr

Referenced by CDFH(), and Serialize().

◆ extra

std::unique_ptr<Extra> XrdZip::CDFH::extra

◆ extraLength

uint16_t XrdZip::CDFH::extraLength

Referenced by CDFH(), CDFH(), and Serialize().

◆ filename

std::string XrdZip::CDFH::filename

Referenced by CDFH(), and Serialize().

◆ filenameLength

uint16_t XrdZip::CDFH::filenameLength

Referenced by CDFH(), CDFH(), and Serialize().

◆ generalBitFlag

uint16_t XrdZip::CDFH::generalBitFlag

Referenced by CDFH(), HasDataDescriptor(), and Serialize().

◆ internAttr

uint16_t XrdZip::CDFH::internAttr

Referenced by CDFH(), and Serialize().

◆ minZipVersion

uint16_t XrdZip::CDFH::minZipVersion

Referenced by CDFH(), CDFH(), and Serialize().

◆ nbDisk

uint16_t XrdZip::CDFH::nbDisk

Referenced by CDFH(), ParseExtra(), and Serialize().

◆ offset

uint32_t XrdZip::CDFH::offset

◆ timestmp

dos_timestmp XrdZip::CDFH::timestmp

Referenced by CDFH(), and Serialize().

◆ uncompressedSize

uint32_t XrdZip::CDFH::uncompressedSize

Referenced by CDFH(), ParseExtra(), and Serialize().

◆ ZCRC32

uint32_t XrdZip::CDFH::ZCRC32

Referenced by CDFH(), and Serialize().

◆ zipVersion

uint16_t XrdZip::CDFH::zipVersion

Referenced by CDFH(), and Serialize().


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