|
JASSv2
|
Subclass of instream for reading from .gz files (files compressed with deflate). More...
#include <instream_deflate.h>


Public Member Functions | |
| instream_deflate (std::shared_ptr< instream > &source) | |
| Constructor. More... | |
| virtual | ~instream_deflate () |
| Destructor. | |
| virtual void | read (document &buffer) |
| Read buffer.contents.size() bytes of data into buffer.contents, resizing on eof. More... | |
Public Member Functions inherited from JASS::instream | |
| instream (std::shared_ptr< instream > &source, std::shared_ptr< allocator > &memory) | |
| Constructor. More... | |
| instream (std::shared_ptr< instream > &source) | |
| Constructor. More... | |
| instream (void) | |
| Constructor. | |
| virtual | ~instream () |
| Destructor. More... | |
| size_t | fetch (void *buffer, size_t bytes) |
| fetch() generates a document object, sets its contents to the passed buffer, calls read() and returns the number of bytes of data read More... | |
Static Public Member Functions | |
| static void | unittest (void) |
| Unit test this class. | |
Private Attributes | |
| z_stream | stream |
| The Zlib stream processing data structure. | |
| uint64_t | bytes_read |
| How many bytes of data have been decoded from the stream. | |
| uint8_t * | buffer |
| Internal deflation buffer. | |
Static Private Attributes | |
| static const size_t | buffer_length = (10 * 1024 * 1024) |
| size of the internal buffer | |
Additional Inherited Members | |
Protected Attributes inherited from JASS::instream | |
| std::shared_ptr< instream > | source |
| If this object is reading from another instream then this is that instream. | |
| std::shared_ptr< allocator > | memory |
| Any and all memory allocation must happen using this object. | |
Subclass of instream for reading from .gz files (files compressed with deflate).
| JASS::instream_deflate::instream_deflate | ( | std::shared_ptr< instream > & | source | ) |
Constructor.
| filename | [in] The name of the file to use as the input stream |
|
virtual |
Read buffer.contents.size() bytes of data into buffer.contents, resizing on eof.
| buffer | [out] buffer.contents.size() bytes of data are read from source into buffer which is resized to the number of bytes read on eof. |
Implements JASS::instream.
1.8.13