zipios Namespace Reference

Classes

class  BackBuffer
 A BackBuffer instance is useful for reading the last part of a file in an efficient manner, when it is not known exactly how far back (towards the front!) to go, to find the start of the desired data block. More...
 
class  BasicEntry
 BasicEntry is a FileEntry that is suitable as a base class for basic entries, that e.g. More...
 
class  CollectionCollection
 CollectionCollection is a FileCollection that consists of an arbitrary number of FileCollections. More...
 
struct  DataDescriptor
 A struct containing fields for the entries in a zip file data descriptor, that trails the compressed data in files that were created by streaming, ie where the zip compressor cannot seek back to the local header and store the data. More...
 
class  DeflateOutputStreambuf
 DeflateOutputStreambuf is an output stream filter, that deflates the data that is written to it before it passes it on to the output stream it is attached to. More...
 
class  DirectoryCollection
 DirectoryCollection is a FileCollection that obtains its entries from a directory. More...
 
class  EndOfCentralDirectory
 The end of the Central directory structure. More...
 
class  Exception
 Basic exception. More...
 
class  FCollException
 An FCollException is used to signal a problem with a FileCollection. More...
 
class  FileCollection
 FileCollection is an abstract baseclass that represents a collection of files. More...
 
class  FileEntry
 A FileEntry represents an entry in a FileCollection. More...
 
class  FilePath
 FilePath represents a path to a file or directory name. More...
 
class  FilterInputStreambuf
 An input streambuf filter is a streambuf that filters the input it gets from the streambuf it is attached to. More...
 
class  FilterOutputStreambuf
 A FilterOutputStreambuf is a streambuf that filters the data that is written to it before it passes it on to the output streambuf it is connected to. More...
 
class  GZIPOutputStream
 GZIPOutputStream is an ostream that writes the output to a gz file. More...
 
class  GZIPOutputStreambuf
 GZIPOutputStreambuf is a zip output streambuf filter. More...
 
class  InflateInputStreambuf
 InflateInputStreambuf is an input stream filter, that inflates the input from the attached input stream. More...
 
class  InvalidStateException
 An object member function may throw this exception, if the operation it normally performs is inappropriate or impossible to perform because of the current state of the object. More...
 
class  IOException
 An IOException is used to signal an I/O error. More...
 
class  OutputStringStream
 OutputStringStream is typedefed to ostringstream if sstream is part of the standard library (unless Zipios++ has been explicitly configured not to use it). More...
 
class  ReferenceCount
 ReferenceCount is useful to ensure proper handling of the reference count for (objects of) classes handled through a SimpleSmartPointer. More...
 
class  SimpleSmartPointer
 SimpleSmartPointer is a simple reference counting smart pointer template. More...
 
class  VirtualSeeker
 VirtualSeeker is a simple class that keeps track of a set of specified 'virtual' file endings that mark a subset of a real file. More...
 
class  ZipCDirEntry
 Specialization of ZipLocalEntry, that add fields for storing the extra information, that is only present in the entries in the zip central directory and not in the local entry headers. More...
 
class  ZipFile
  ZipFile is a FileCollection, where the files are stored in a .zip file. More...
 
class  ZipInputStream
 ZipInputStream is an istream that gets it's input from a zip file. More...
 
class  ZipInputStreambuf
 ZipInputStreambuf is a zip input streambuf filter. More...
 
class  ZipLocalEntry
 A concrete implementation of the abstract FileEntry base class for ZipFile entries, specifically for representing the information present in the local headers of file entries in a zip file. More...
 
class  ZipOutputStream
 ZipOutputStream is an ostream that writes the output to a zip file. More...
 
class  ZipOutputStreambuf
 ZipOutputStreambuf is a zip output streambuf filter. More...
 

Typedefs

typedef CollectionCollection CColl
 Shortcut name for a CollectionCollection. More...
 
typedef vector< EntryPointerConstEntries
 ConstEntries is a vector of ConstEntryPointer's. More...
 
typedef SimpleSmartPointer< const FileEntryConstEntryPointer
 ConstEntryPointer is a SimpleSmartPointer for const FileEntry's. More...
 
typedef BasicEntry DirEntry
 DirEntry is a BasicEntry. More...
 
typedef vector< EntryPointerEntries
 Entries is a vector of EntryPointer's. More...
 
typedef SimpleSmartPointer< FileEntryEntryPointer
 EntryPointer is a SimpleSmartPointer for FileEntry's. More...
 
typedef uint16_t uint16
 
typedef uint32_t uint32
 

Enumerations

enum  StorageMethod {
  STORED = 0 , SHRUNK , REDUCED1 , REDUCED2 ,
  REDUCED3 , REDUCED4 , IMPLODED , RESERVED ,
  DEFLATED
}
 The types used with FileEntry::setMethod and FileEntry::getMethod. More...
 

Functions

uint32 htozl (unsigned char *buf)
 
uint16 htozs (unsigned char *buf)
 
template<class T >
const T & min (const T &a, const T &b)
 
bool operator!= (const ZipCDirEntry &ze, const ZipLocalEntry &zlh)
 
bool operator!= (const ZipLocalEntry &zlh, const ZipCDirEntry &ze)
 
template<class Type >
void operator+= (vector< Type > &v1, const vector< Type > &v2)
 
ostream & operator<< (ostream &os, const ConstEntryPointer &entry)
 
ostream & operator<< (ostream &os, const FileCollection &collection)
 
ostream & operator<< (ostream &os, const FileEntry &entry)
 
std::ostream & operator<< (std::ostream &os, const EndOfCentralDirectory &eocd)
 
std::ostream & operator<< (std::ostream &os, const ZipCDirEntry &zcdh)
 
std::ostream & operator<< (std::ostream &os, const ZipLocalEntry &zlh)
 
bool operator== (const ZipCDirEntry &ze, const ZipLocalEntry &zlh)
 
bool operator== (const ZipLocalEntry &zlh, const ZipCDirEntry &ze)
 
std::istream & operator>> (std::istream &is, DataDescriptor &)
 
std::istream & operator>> (std::istream &is, ZipCDirEntry &zcdh)
 
std::istream & operator>> (std::istream &is, ZipLocalEntry &zlh)
 
void readByteSeq (istream &is, string &con, int count)
 
void readByteSeq (istream &is, unsigned char *buf, int count)
 
void readByteSeq (istream &is, vector< unsigned char > &vec, int count)
 
uint16 readUint16 (istream &is)
 
uint32 readUint32 (istream &is)
 
void writeByteSeq (ostream &os, const string &con)
 
void writeByteSeq (ostream &os, const unsigned char *buf, int count)
 
void writeByteSeq (ostream &os, const vector< unsigned char > &vec)
 
void writeUint16 (uint16 host_val, ostream &os)
 
void writeUint32 (uint32 host_val, ostream &os)
 
uint32 ztohl (unsigned char *buf)
 
uint16 ztohs (unsigned char *buf)
 

Variables

static const char separator = '/'
 

Typedef Documentation

◆ CColl

Shortcut name for a CollectionCollection.

If the static method inst is used, it is often used a lot, so it's handy with a short name for CollectionCollection

◆ ConstEntries

ConstEntries is a vector of ConstEntryPointer's.

◆ ConstEntryPointer

ConstEntryPointer is a SimpleSmartPointer for const FileEntry's.


◆ DirEntry

DirEntry is a BasicEntry.

◆ Entries

typedef vector< EntryPointer > zipios::Entries

Entries is a vector of EntryPointer's.

◆ EntryPointer

◆ uint16

typedef uint16_t zipios::uint16

◆ uint32

typedef uint32_t zipios::uint32

Enumeration Type Documentation

◆ StorageMethod

The types used with FileEntry::setMethod and FileEntry::getMethod.

The current entries are the types supported by the zip format. The numbering also matches the numbering used in the zip file format, ie STORED is indicated by a 0 in the method field in a zip file and so on.

Enumerator
STORED 
SHRUNK 
REDUCED1 
REDUCED2 
REDUCED3 
REDUCED4 
IMPLODED 
RESERVED 
DEFLATED 

Function Documentation

◆ htozl()

uint32 zipios::htozl ( unsigned char *  buf)

References ztohl().

Referenced by writeUint32().

◆ htozs()

uint16 zipios::htozs ( unsigned char *  buf)

References ztohs().

Referenced by writeUint16().

◆ min()

template<class T >
const T & zipios::min ( const T &  a,
const T &  b 
)

◆ operator!=() [1/2]

bool zipios::operator!= ( const ZipCDirEntry ze,
const ZipLocalEntry zlh 
)

◆ operator!=() [2/2]

bool zipios::operator!= ( const ZipLocalEntry zlh,
const ZipCDirEntry ze 
)

◆ operator+=()

template<class Type >
void zipios::operator+= ( vector< Type > &  v1,
const vector< Type > &  v2 
)

◆ operator<<() [1/6]

ostream & zipios::operator<< ( ostream &  os,
const ConstEntryPointer entry 
)

◆ operator<<() [2/6]

ostream & zipios::operator<< ( ostream &  os,
const FileCollection collection 
)

◆ operator<<() [3/6]

ostream & zipios::operator<< ( ostream &  os,
const FileEntry entry 
)

◆ operator<<() [4/6]

ostream & zipios::operator<< ( std::ostream &  os,
const EndOfCentralDirectory eocd 
)

◆ operator<<() [5/6]

ostream & zipios::operator<< ( std::ostream &  os,
const ZipCDirEntry zcdh 
)

◆ operator<<() [6/6]

ostream & zipios::operator<< ( std::ostream &  os,
const ZipLocalEntry zlh 
)

◆ operator==() [1/2]

bool zipios::operator== ( const ZipCDirEntry ze,
const ZipLocalEntry zlh 
)

◆ operator==() [2/2]

bool zipios::operator== ( const ZipLocalEntry zlh,
const ZipCDirEntry ze 
)

◆ operator>>() [1/3]

istream & zipios::operator>> ( std::istream &  is,
DataDescriptor  
)

◆ operator>>() [2/3]

istream & zipios::operator>> ( std::istream &  is,
ZipCDirEntry zcdh 
)

◆ operator>>() [3/3]

istream & zipios::operator>> ( std::istream &  is,
ZipLocalEntry zlh 
)

◆ readByteSeq() [1/3]

void zipios::readByteSeq ( istream &  is,
string &  con,
int  count 
)

◆ readByteSeq() [2/3]

void zipios::readByteSeq ( istream &  is,
unsigned char *  buf,
int  count 
)

◆ readByteSeq() [3/3]

void zipios::readByteSeq ( istream &  is,
vector< unsigned char > &  vec,
int  count 
)

◆ readUint16()

uint16 zipios::readUint16 ( istream &  is)

References ztohs().

◆ readUint32()

uint32 zipios::readUint32 ( istream &  is)

References ztohl().

Referenced by zipios::ZipFile::openEmbeddedZipFile().

◆ writeByteSeq() [1/3]

void zipios::writeByteSeq ( ostream &  os,
const string &  con 
)

◆ writeByteSeq() [2/3]

void zipios::writeByteSeq ( ostream &  os,
const unsigned char *  buf,
int  count 
)

◆ writeByteSeq() [3/3]

void zipios::writeByteSeq ( ostream &  os,
const vector< unsigned char > &  vec 
)

◆ writeUint16()

void zipios::writeUint16 ( uint16  host_val,
ostream &  os 
)

References htozs().

◆ writeUint32()

void zipios::writeUint32 ( uint32  host_val,
ostream &  os 
)

References htozl().

◆ ztohl()

uint32 zipios::ztohl ( unsigned char *  buf)

◆ ztohs()

uint16 zipios::ztohs ( unsigned char *  buf)

Variable Documentation

◆ separator