Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

ht_compressed_stream Class Reference

#include <cstream.h>

Inheritance diagram for ht_compressed_stream:

ht_layer_stream ht_stream List of all members.

Public Member Functions

void init (ht_stream *stream, bool own_stream, UINT granularity=COMPRESSED_STREAM_DEFAULT_GRANULARITY)
virtual void done ()
virtual UINT read (void *buf, UINT size)
virtual UINT write (const void *buf, UINT size)

Protected Member Functions

bool flush_compressed ()
bool flush_uncompressed ()

Protected Attributes

byte * buffer
UINT buffersize
UINT bufferpos

Member Function Documentation

void ht_compressed_stream::done  )  [virtual]
 

Reimplemented from ht_layer_stream.

Definition at line 41 of file cstream.cc.

References buffer, ht_layer_stream::done(), FAM_WRITE, flush_compressed(), and ht_layer_stream::get_access_mode().

bool ht_compressed_stream::flush_compressed  )  [protected]
 

Definition at line 50 of file cstream.cc.

References big_endian, buffer, bufferpos, byte, create_foreign_int(), lzo1x_1_compress(), LZO1X_1_MEM_COMPRESS, lzo_uint, smalloc(), and ht_stream::write().

Referenced by done(), and write().

bool ht_compressed_stream::flush_uncompressed  )  [protected]
 

Definition at line 84 of file cstream.cc.

References assert, big_endian, buffer, bufferpos, buffersize, byte, create_host_int(), lzo1x_decompress(), lzo_uint, NULL, ht_stream::read(), smalloc(), and UINT.

Referenced by read().

void ht_compressed_stream::init ht_stream stream,
bool  own_stream,
UINT  granularity = COMPRESSED_STREAM_DEFAULT_GRANULARITY
 

Definition at line 29 of file cstream.cc.

References assert, buffer, bufferpos, buffersize, byte, FAM_READ, FAM_WRITE, ht_layer_stream::get_access_mode(), ht_stream::init(), smalloc(), and UINT.

Referenced by create_object_stream().

UINT ht_compressed_stream::read void *  buf,
UINT  size
[virtual]
 

Reimplemented from ht_layer_stream.

Definition at line 118 of file cstream.cc.

References buf, buffer, bufferpos, buffersize, byte, flush_uncompressed(), size, and UINT.

UINT ht_compressed_stream::write const void *  buf,
UINT  size
[virtual]
 

Reimplemented from ht_layer_stream.

Definition at line 138 of file cstream.cc.

References buf, buffer, bufferpos, buffersize, byte, flush_compressed(), size, and UINT.


Member Data Documentation

byte* ht_compressed_stream::buffer [protected]
 

Definition at line 34 of file cstream.h.

Referenced by done(), flush_compressed(), flush_uncompressed(), init(), read(), and write().

UINT ht_compressed_stream::bufferpos [protected]
 

Definition at line 36 of file cstream.h.

Referenced by flush_compressed(), flush_uncompressed(), init(), read(), and write().

UINT ht_compressed_stream::buffersize [protected]
 

Definition at line 35 of file cstream.h.

Referenced by flush_uncompressed(), init(), read(), and write().


The documentation for this class was generated from the following files:
Generated on Fri May 7 21:15:57 2004 by doxygen 1.3.5