zipios(3) | zipios | zipios(3) |
NAME¶
zipios - The zipios namespace includes the Zipios library definitions.
SYNOPSIS¶
Namespaces¶
namespace anonymous_namespace{collectioncollection.cpp}
namespace anonymous_namespace{dosdatetime.cpp}
namespace anonymous_namespace{filecollection.cpp}
namespace anonymous_namespace{filepath.cpp}
namespace anonymous_namespace{zipcentraldirectoryentry.cpp}
namespace anonymous_namespace{zipendofcentraldirectory.cpp}
Private definitions of the ZipEndOfCentralDirectory class. namespace
anonymous_namespace{ziplocalentry.cpp}
Various definitions for local blocks. namespace
anonymous_namespace{zipoutputstreambuf.cpp}
Classes¶
class BackBuffer
To read a file by chunk from the end. class CollectionCollection
A collection of collections. class DeflateOutputStreambuf
A class to handle stream deflate on the fly. class DirectoryCollection
A collection generated from reading a directory. class DirectoryEntry
A file entry that does not use compression. class DOSDateTime
union dosdatetime_convert_t
Union used to convert the uint32_t to fields and vice versa. class
Exception
Base exception of the zipios environment. class FileCollection
Base class for various file collections. class FileCollectionException
FileCollectionException is used to signal a FileCollection
problem. class FileEntry
A FileEntry represents an entry in a FileCollection. class
FilePath
Handle a file path and name and its statistics. class
FilterInputStreambuf
A base class to develop input stream filters. class
FilterOutputStreambuf
A base class to develop output stream filters. class GZIPOutputStream
A stream implementation that outputs data to a ZIP file. class
GZIPOutputStreambuf
Save the output stream buffer. class InflateInputStreambuf
A stream buffer to inflate data previous compressed with zlib. class
InvalidException
An InvalidException is used when invalid data is provided. class
InvalidStateException
Exception used when it is not possible to move forward. class
IOException
An IOException is used to signal an I/O error. class StreamEntry
A file entry reading from a stream. class VirtualSeeker
A virtual class used to see in a file embedded in another. class
ZipCentralDirectoryEntry
A specialization of ZipLocalEntry for. class
ZipEndOfCentralDirectory
Marker at the end of a Zip archive file. class ZipFile
The ZipFile class represents a collection of files. class
ZipInputStream
The ZipInputStream to read data from a Zip archive. class
ZipInputStreambuf
An input stream buffer for Zip data. class ZipLocalEntry
An implementation of the FileEntry for Zip archives. class
ZipOutputStream
A ZipOutputStream to allow for data to be compressed with zlib. class
ZipOutputStreambuf
Handle the output buffer of a zip archive.
Typedefs¶
typedef std::vector< unsigned char > buffer_t
A buffer of characters. typedef std::streamoff offset_t
typedef std::ostringstream OutputStringStream
An output stream using strings.
Enumerations¶
enum class StorageMethod : uint8_t { STORED = 0,
SHRUNK = 1, REDUCED1 = 2, REDUCED2 = 3, REDUCED3
= 4, REDUCED4 = 5, IMPLODED = 6, TOKENIZED = 7,
DEFLATED = 8, DEFLATED64 = 9, OLD_TERSE = 10,
RESERVED11 = 11, BZIP2 = 12, REVERVED13 = 13,
LZMA = 14, RESERVED15 = 15, RESERVED16 = 16,
RESERVED17 = 17, NEW_TERSE = 18, LZ77 = 19,
WAVPACK = 97, PPMD_I_1 = 98 }
The types used with FileEntry::setMethod and FileEntry::getMethod.
Functions¶
size_t getBufferSize ()
char const * getVersion ()
std::ostream & operator<< (std::ostream &os,
FileCollection const &collection)
Write a FileCollection to the output stream. std::ostream &
operator<< (std::ostream &os, FileEntry const
&entry)
Output an entry as a string to a stream. std::ostream &
operator<< (std::ostream &os, FilePath const
&path)
Print out a FilePath. bool operator== (char const *lhs,
FilePath const &rhs)
Check whether two FilePath represent the same file. bool
operator== (std::string const &lhs, FilePath const
&rhs)
Check whether two FilePath represent the same file. void zipRead
(buffer_t const &is, size_t &pos, buffer_t
&buffer, ssize_t const count)
void zipRead (buffer_t const &is, size_t &pos,
std::string &str, ssize_t const count)
void zipRead (buffer_t const &is, size_t &pos, uint16_t
&value)
void zipRead (buffer_t const &is, size_t &pos, uint32_t
&value)
void zipRead (buffer_t const &is, size_t &pos, uint8_t
&value)
void zipRead (std::istream &is, buffer_t &buffer,
ssize_t const count)
void zipRead (std::istream &is, std::string &str, ssize_t const
count)
void zipRead (std::istream &is, uint16_t &value)
void zipRead (std::istream &is, uint32_t &value)
void zipRead (std::istream &is, uint8_t &value)
void zipWrite (std::ostream &os, buffer_t const &buffer)
void zipWrite (std::ostream &os, std::string const &str)
void zipWrite (std::ostream &os, uint16_t const &value)
void zipWrite (std::ostream &os, uint32_t const &value)
void zipWrite (std::ostream &os, uint8_t const &value)
Variables¶
char const g_separator = '/'
The character used as the filename separator.
Detailed Description¶
This namespace is used to clearly separate all the Zipios definitions. Note that a very few definitions are found outside of the namespace. Some of those are hidden in the source of the library, a very few appear in the zipios-config.hpp file as they are used to support Zipios on any platform.
Note that to ensure secure development, we do not make use of the C++ 'using ...' keyword. That way we can guarantee what's what.
Typedef Documentation¶
std::vector< unsigned char > zipios::buffer_t¶
This type is used to declare a buffer of characters. It is used in many places.
Todo
Definition at line 98 of file zipios_common.hpp.
typedef std::streamoff zipios::offset_t¶
Definition at line 59 of file zipios-config.hpp.in.
std::ostringstream zipios::OutputStringStream¶
This object is used whenever we want to output a buffer from a string and convert that to a string.
Definition at line 95 of file zipios_common.hpp.
Enumeration Type Documentation¶
enum class zipios::StorageMethod : uint8_t [strong]¶
The current entries are the types supported by the zip format. The numbering matches one to one the numbering used in the zip file format, i.e. STORED is indicated by a 0 in the method field in a zip file and so on.
The zipios library only support STORED and DEFLATED at this time.
Enumerator
- STORED
- SHRUNK
- REDUCED1
- REDUCED2
- REDUCED3
- REDUCED4
- IMPLODED
- TOKENIZED
- DEFLATED
- DEFLATED64
- OLD_TERSE
- RESERVED11
- BZIP2
- REVERVED13
- LZMA
- RESERVED15
- RESERVED16
- RESERVED17
- NEW_TERSE
- LZ77
- WAVPACK
- PPMD_I_1
Definition at line 48 of file fileentry.hpp.
Function Documentation¶
size_t zipios::getBufferSize () [inline]¶
Definition at line 62 of file zipios-config.hpp.in.
Referenced by zipios::ZipInputStreambuf::ZipInputStreambuf(), zipios::DeflateOutputStreambuf::endDeflation(), zipios::DeflateOutputStreambuf::flushOutvec(), zipios::DeflateOutputStreambuf::init(), zipios::DeflateOutputStreambuf::overflow(), zipios::ZipOutputStreambuf::overflow(), zipios::ZipOutputStreambuf::putNextEntry(), zipios::InflateInputStreambuf::reset(), zipios::InflateInputStreambuf::underflow(), and zipios::ZipInputStreambuf::underflow().
char const * zipios::getVersion () [inline]¶
Definition at line 53 of file zipios-config.hpp.in.
References ZIPIOS_VERSION_STRING.
Referenced by main().
std::ostream & zipios::operator<< (std::ostream & os, FileCollection const & collection)¶
This function writes a simple textual representation of this FileCollection to the output stream.
Parameters
collection The collection to print out.
Returns
Definition at line 605 of file filecollection.cpp.
References zipios::FileCollection::entries(), and zipios::FileCollection::getName().
std::ostream & zipios::operator<< (std::ostream & os, FileEntry const & entry)¶
This function transforms the FileEntry basic information into a string and prints the result to the specified output stream.
Parameters
entry The entry to print out.
Returns
See also
Definition at line 768 of file fileentry.cpp.
References zipios::FileEntry::toString().
std::ostream & zipios::operator<< (std::ostream & os, FilePath const & path)¶
This function prints out the name of the file that this FilePath represents.
Parameters
path The path to print out.
Returns
Definition at line 538 of file filepath.cpp.
bool zipios::operator== (char const * lhs, FilePath const & rhs)¶
This function compares a FilePath object (this) and a C-string to know whether the two are the same.
A null pointer as the C-string is viewed as an empty string.
Parameters
rhs The right hand side to compare with.
See also
Definition at line 235 of file filepath.cpp.
bool zipios::operator== (std::string const & lhs, FilePath const & rhs)¶
This function compares a FilePath object (this) against a string representing a path to know whether the two are the equal.
Parameters
rhs The right hand side to compare with.
See also
Definition at line 268 of file filepath.cpp.
void zipios::zipRead (buffer_t const & is, size_t & pos, buffer_t & buffer, ssize_t const count)¶
Definition at line 209 of file zipios_common.cpp.
void zipios::zipRead (buffer_t const & is, size_t & pos, std::string & str, ssize_t const count)¶
Definition at line 223 of file zipios_common.cpp.
void zipios::zipRead (buffer_t const & is, size_t & pos, uint16_t & value)¶
Definition at line 182 of file zipios_common.cpp.
void zipios::zipRead (buffer_t const & is, size_t & pos, uint32_t & value)¶
Definition at line 166 of file zipios_common.cpp.
void zipios::zipRead (buffer_t const & is, size_t & pos, uint8_t & value)¶
Definition at line 196 of file zipios_common.cpp.
void zipios::zipRead (std::istream & is, buffer_t & buffer, ssize_t const count)¶
Definition at line 132 of file zipios_common.cpp.
void zipios::zipRead (std::istream & is, std::string & str, ssize_t const count)¶
Definition at line 149 of file zipios_common.cpp.
void zipios::zipRead (std::istream & is, uint16_t & value)¶
Definition at line 95 of file zipios_common.cpp.
void zipios::zipRead (std::istream & is, uint32_t & value)¶
Definition at line 74 of file zipios_common.cpp.
Referenced by zipios::ZipFile::openEmbeddedZipFile(), zipios::ZipEndOfCentralDirectory::read(), zipios::ZipCentralDirectoryEntry::read(), zipios::ZipLocalEntry::read(), and zipios::BackBuffer::readChunk().
void zipios::zipRead (std::istream & is, uint8_t & value)¶
Definition at line 114 of file zipios_common.cpp.
void zipios::zipWrite (std::ostream & os, buffer_t const & buffer)¶
Definition at line 280 of file zipios_common.cpp.
void zipios::zipWrite (std::ostream & os, std::string const & str)¶
Definition at line 289 of file zipios_common.cpp.
void zipios::zipWrite (std::ostream & os, uint16_t const & value)¶
Definition at line 253 of file zipios_common.cpp.
void zipios::zipWrite (std::ostream & os, uint32_t const & value)¶
Definition at line 237 of file zipios_common.cpp.
Referenced by zipios::ZipEndOfCentralDirectory::write(), zipios::ZipCentralDirectoryEntry::write(), and zipios::ZipLocalEntry::write().
void zipios::zipWrite (std::ostream & os, uint8_t const & value)¶
Definition at line 267 of file zipios_common.cpp.
Variable Documentation¶
char const zipios::g_separator = '/'¶
This character is used to separate filename segments in a path in a Zip archive.
Todo
Definition at line 51 of file zipios_common.cpp.
Referenced by zipios::FilePath::filename(), zipios::FilePath::operator+(), zipios::anonymous_namespace{filepath.cpp}::pruneTrailingSeparator(), zipios::ZipCentralDirectoryEntry::read(), zipios::ZipLocalEntry::read(), zipios::ZipCentralDirectoryEntry::write(), and zipios::ZipLocalEntry::write().
Author¶
Generated automatically by Doxygen for zipios from the source code.
Sat Dec 30 2023 01:18:29 | Version 2.3.2 |