XRootD
Loading...
Searching...
No Matches
XrdZip Namespace Reference

Classes

struct  bad_data
struct  CDFH
struct  DataDescriptor
struct  dos_timestmp
struct  EOCD
struct  Extra
struct  LFH
 A data structure representing ZIP Local File Header. More...
struct  ovrflw
struct  ZIP64_EOCD
struct  ZIP64_EOCDL
 A data structure representing the ZIP64 end of central directory locator. More...

Typedefs

typedef std::vector< char > buffer_t
typedef std::unordered_map< std::string, size_t > cdmap_t
typedef std::unordered_map< std::string, std::unique_ptr< CDFH > > cdrecs_t
typedef std::vector< std::unique_ptr< CDFH > > cdvec_t

Functions

template<typename INT>
static void copy_bytes (const INT value, buffer_t &buffer)
template<typename INT>
static void from_buffer (INT &var, const char *&buffer)
template<typename INT>
static INT to (const char *buffer)

Typedef Documentation

◆ buffer_t

typedef std::vector<char> XrdZip::buffer_t

Definition at line 56 of file XrdZipUtils.hh.

◆ cdmap_t

typedef std::unordered_map<std::string, size_t> XrdZip::cdmap_t

Definition at line 56 of file XrdZipCDFH.hh.

◆ cdrecs_t

typedef std::unordered_map<std::string, std::unique_ptr<CDFH> > XrdZip::cdrecs_t

Definition at line 61 of file XrdZipCDFH.hh.

◆ cdvec_t

typedef std::vector<std::unique_ptr<CDFH> > XrdZip::cdvec_t

Definition at line 51 of file XrdZipCDFH.hh.

Function Documentation

◆ copy_bytes()

template<typename INT>
void XrdZip::copy_bytes ( const INT value,
buffer_t & buffer )
inlinestatic

Definition at line 62 of file XrdZipUtils.hh.

63 {
64 const char *begin = reinterpret_cast<const char*>( &value );
65 const char *end = begin + sizeof( INT );
66#ifdef Xrd_Big_Endian
67 std::reverse_copy( begin, end, std::back_inserter( buffer ) );
68#else
69 std::copy( begin, end, std::back_inserter( buffer ) );
70#endif
71 }

References copy_bytes().

Referenced by copy_bytes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ from_buffer()

template<typename INT>
void XrdZip::from_buffer ( INT & var,
const char *& buffer )
inlinestatic

Definition at line 78 of file XrdZipUtils.hh.

79 {
80 memcpy( &var, buffer, sizeof( INT ) );
81#ifdef Xrd_Big_Endian
82 var = bswap(var);
83#endif
84 buffer += sizeof( INT );
85 }

References from_buffer().

Referenced by from_buffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to()

template<typename INT>
INT XrdZip::to ( const char * buffer)
inlinestatic

Definition at line 91 of file XrdZipUtils.hh.

92 {
93 INT value;
94 memcpy( &value, buffer, sizeof( INT ) );
95#ifdef Xrd_Big_Endian
96 value = bswap(value);
97#endif
98 return value;
99 }