Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
#include <GZipCodec.hpp>

Public Member Functions | |
| GZipCodec (VirtualFile *stream=NULL) | |
| Constructor. | |
| GZipCodec (const String &gz_path) | |
| Constructor. | |
| ~GZipCodec () | |
| Destructor. | |
| virtual const char * | className () |
| Returns the name of the class. | |
| virtual bool | open (EOpenMode mode) |
| Opens a compressed stream. | |
| virtual bool | isOpen () const |
| Returns true if the file is open for read or writing. | |
| virtual bool | exists () const |
| Returns true if the input or output stream file exists. | |
| virtual void | close () |
| Closes the GZipStream. | |
| virtual long long | size () const |
| Returns the uncompressed size of the stream. This is not a thread safe function. | |
| virtual ref< VirtualFile > | clone () const |
| Returns an equivalent GZipCodec. | |
| GZipCodec & | operator= (const GZipCodec &other) |
| void | setCompressionLevel (int level) |
| Sets the compression level used during write operations. | |
| int | compressionLevel () const |
| void | setStream (VirtualFile *stream) |
| Installs the VirtualFile representing the GZip file to be read or to be written. | |
| const VirtualFile * | stream () const |
| Returns the VirtualFile representing the GZip file to be read or to be written. | |
| VirtualFile * | stream () |
| Returns the VirtualFile representing the GZip file to be read or to be written. | |
| long long | uncompressedSize () |
| Returns the uncompressed size of the stream. | |
| long long | compressedSize () const |
Returns the size of the compressed stream as returned by stream()->size(). | |
| float | compressionRatio () const |
Returns the compression ratio computed as compressedsize/uncompressedsize. | |
| bool | warnOnSeek () const |
| void | setWarnOnSeek (bool warn_on) |
Protected Types | |
| enum | { ZNone, ZCompress, ZDecompress } |
Protected Member Functions | |
| virtual long long | read_Implementation (void *buffer, long long bytes_to_read) |
| virtual long long | write_Implementation (const void *buffer, long long byte_count) |
| virtual long long | position_Implementation () const |
| void | resetStream () |
| bool | seekSet_Implementation (long long pos) |
| bool | fillUncompressedBuffer () |
Protected Attributes | |
| int | mCompressionLevel |
| ref< VirtualFile > | mStream |
| long long | mReadBytes |
| long long | mWrittenBytes |
| bool | mWarnOnSeek |
| z_stream_s * | mZStream |
| unsigned char | mZipBufferIn [CHUNK_SIZE] |
| unsigned char | mZipBufferOut [CHUNK_SIZE] |
| std::vector< char > | mUncompressedBuffer |
| int | mUncompressedBufferPtr |
| long long | mStreamSize |
| long long | mUncompressedSize |
| enum vl::GZipCodec:: { ... } | mMode |
| GZipCodec::GZipCodec | ( | VirtualFile * | stream = NULL |
) |
Constructor.
| GZipCodec::GZipCodec | ( | const String & | gz_path | ) |
Constructor.
| GZipCodec::~GZipCodec | ( | ) |
Destructor.
| virtual const char* vl::GZipCodec::className | ( | ) | [inline, virtual] |
| bool GZipCodec::open | ( | EOpenMode | mode | ) | [virtual] |
Opens a compressed stream.
mode == OM_ReadOnly the stream will be decompressed during read operations.mode == OM_WriteOnly the stream will be compressed during write operations. Implements vl::VirtualFile.
| virtual bool vl::GZipCodec::isOpen | ( | ) | const [inline, virtual] |
| virtual bool vl::GZipCodec::exists | ( | ) | const [inline, virtual] |
| void GZipCodec::close | ( | ) | [virtual] |
| long long GZipCodec::size | ( | ) | const [virtual] |
Returns the uncompressed size of the stream. This is not a thread safe function.
Implements vl::VirtualFile.
| ref< VirtualFile > GZipCodec::clone | ( | ) | const [virtual] |
| void vl::GZipCodec::setCompressionLevel | ( | int | level | ) | [inline] |
Sets the compression level used during write operations.
| level | Values can be between 0 (faster compression) to 9 (slower but better compression). |
| int vl::GZipCodec::compressionLevel | ( | ) | const [inline] |
| void GZipCodec::setStream | ( | VirtualFile * | stream | ) |
Installs the VirtualFile representing the GZip file to be read or to be written.
| const VirtualFile* vl::GZipCodec::stream | ( | ) | const [inline] |
Returns the VirtualFile representing the GZip file to be read or to be written.
| VirtualFile* vl::GZipCodec::stream | ( | ) | [inline] |
Returns the VirtualFile representing the GZip file to be read or to be written.
| long long GZipCodec::uncompressedSize | ( | ) |
Returns the uncompressed size of the stream.
| long long vl::GZipCodec::compressedSize | ( | ) | const [inline] |
| float GZipCodec::compressionRatio | ( | ) | const |
Returns the compression ratio computed as compressedsize/uncompressedsize.
| bool vl::GZipCodec::warnOnSeek | ( | ) | const [inline] |
| void vl::GZipCodec::setWarnOnSeek | ( | bool | warn_on | ) | [inline] |
| long long GZipCodec::read_Implementation | ( | void * | buffer, | |
| long long | bytes_to_read | |||
| ) | [protected, virtual] |
Implements vl::VirtualFile.
| long long GZipCodec::write_Implementation | ( | const void * | buffer, | |
| long long | byte_count | |||
| ) | [protected, virtual] |
Implements vl::VirtualFile.
| long long GZipCodec::position_Implementation | ( | ) | const [protected, virtual] |
Implements vl::VirtualFile.
| void GZipCodec::resetStream | ( | ) | [protected] |
| bool GZipCodec::seekSet_Implementation | ( | long long | pos | ) | [protected, virtual] |
Implements vl::VirtualFile.
| bool GZipCodec::fillUncompressedBuffer | ( | ) | [protected] |
int vl::GZipCodec::mCompressionLevel [protected] |
ref<VirtualFile> vl::GZipCodec::mStream [protected] |
long long vl::GZipCodec::mReadBytes [protected] |
long long vl::GZipCodec::mWrittenBytes [protected] |
bool vl::GZipCodec::mWarnOnSeek [protected] |
z_stream_s* vl::GZipCodec::mZStream [protected] |
unsigned char vl::GZipCodec::mZipBufferIn[CHUNK_SIZE] [protected] |
unsigned char vl::GZipCodec::mZipBufferOut[CHUNK_SIZE] [protected] |
std::vector<char> vl::GZipCodec::mUncompressedBuffer [protected] |
int vl::GZipCodec::mUncompressedBufferPtr [protected] |
long long vl::GZipCodec::mStreamSize [protected] |
long long vl::GZipCodec::mUncompressedSize [protected] |
enum { ... } vl::GZipCodec::mMode [protected] |