Go to the documentation of this file.
28 #ifndef __OGRE_DEFLATE_H__
29 #define __OGRE_DEFLATE_H__
112 size_t read(
void* buf,
size_t count);
116 size_t write(
const void* buf,
size_t count);
struct z_stream_s z_stream
size_t tell(void) const
Returns the current byte offset from beginning.
General purpose class used for encapsulating the reading and writing of data.
void close(void)
Close the stream; this makes further operations invalid.
void seek(size_t pos)
Repositions the read point to a specified byte.
size_t write(const void *buf, size_t count)
Write the requisite number of bytes from the stream (only applicable to streams that are not read-onl...
void skip(long count)
Skip a defined number of bytes.
bool mIsCompressedValid
Whether the underlying stream is valid compressed data.
DeflateStream(const String &name, const DataStreamPtr &compressedStream, const String &tmpFileName="", size_t avail_in=0)
Constructor for creating named stream wrapping another stream.
DataStreamPtr mTmpWriteStream
Stream which compresses / uncompresses data using the 'deflate' compression algorithm.
bool eof(void) const
Returns true if the stream has reached the end.
bool isCompressedStreamValid() const
Returns whether the compressed stream is valid deflated data.
DataStreamPtr mCompressedStream
DeflateStream(const DataStreamPtr &compressedStream, const String &tmpFileName="", size_t avail_in=0)
Constructor for creating unnamed stream wrapping another stream.
StaticCache< 16 *OGRE_STREAM_TEMP_SIZE > mReadCache
Cache for read data in case skipping around.
size_t read(void *buf, size_t count)
Read the requisite number of bytes from the stream, stopping at the end of the file.
size_t getAvailInForSinglePass()
unsigned char * mTmp
Intermediate buffer for read / write.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.