StreamCompressionFilter Class Reference

Compresses data transparently into another stream (using bzip2 compression). More...

#include <basestrm.h>

Inheritance diagram for StreamCompressionFilter:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 StreamCompressionFilter (tnstream *outputstream)
virtual void writedata (const void *buf, int size)
 writes data to the stream
virtual int readdata (void *buf, int size, bool excpt=true)
 Reads data from the stream.
void close ()
 ~StreamCompressionFilter ()

Detailed Description

Compresses data transparently into another stream (using bzip2 compression).

See also:
StreamDecompressionFilter

Definition at line 600 of file basestrm.h.


Constructor & Destructor Documentation

StreamCompressionFilter::StreamCompressionFilter ( tnstream outputstream  ) 

Definition at line 1845 of file basestrm.cpp.

StreamCompressionFilter::~StreamCompressionFilter (  ) 

Definition at line 1869 of file basestrm.cpp.

References close().


Member Function Documentation

void StreamCompressionFilter::writedata ( const void *  buf,
int  size 
) [virtual]

writes data to the stream

Parameters:
buf pointer to the buffer
size the number of bytes which are going to be written

Implements tnstream.

Definition at line 1850 of file basestrm.cpp.

References libbzip_compression::writedata().

Referenced by testStreamEncoding2().

int StreamCompressionFilter::readdata ( void *  buf,
int  size,
bool  excpt = true 
) [virtual]

Reads data from the stream.

Parameters:
buf the buffer which the data is written to
size the number of bytes which should be read
excpt If true the operation will throw an exception if the desired number of bytes cannot be read.
Returns:
the number of bytes which were read.

Implements tnstream.

Definition at line 1855 of file basestrm.cpp.

References tnstream::reading, and tnstream::writing.

void StreamCompressionFilter::close (  ) 

Definition at line 1860 of file basestrm.cpp.

References libbzip_compression::close_compression().

Referenced by testStreamEncoding2(), and ~StreamCompressionFilter().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:47:36 2012 for Advanced Strategic Command by  doxygen 1.5.1