ZBuffer Class Reference

#include <Pt/ZBuffer.h>

Stream buffer for zlib compression.

Inherits BasicStreamBuffer< char >.

Public Member Functions

 ZBuffer ()
 Default Constructor.
 
 ZBuffer (std::ios &ios)
 Construct with target stream.
 
virtual ~ZBuffer ()
 Destructor.
 
void attach (std::ios &target)
 Attach to target stream.
 
void detach ()
 Detach from target stream.
 
void discard ()
 Discards the buffer content and resets the state.
 
void finish ()
 Finish and flush remaining data to the target stream.
 
std::streamsize import (std::streamsize maxImport=0)
 Import data from the target stream. More...
 
std::streamsize out_avail ()
 Returns the number of characters buffered for output.
 
void reset ()
 Detach from target stream, discard the buffer and reset the state.
 
void reset (std::ios &target)
 Attach to target stream, discard the buffer and reset the state.
 
std::streamsize speekn (char *buffer, std::streamsize size)
 Peek data in stream.
 

Protected Member Functions

virtual std::streamsize showfull ()
 Returns the number of characters buffered for output.
 

Member Function Documentation

std::streamsize import ( std::streamsize  maxImport = 0)

Returns the number of bytes consumed from the underlyig stream.