ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cheprep::DeflateOutputStreamBuffer Class Reference

#include <geant4/tree/geant4-10.6-release/source/visualization/HepRep/include/cheprep/DeflateOutputStreamBuffer.h>

+ Inheritance diagram for cheprep::DeflateOutputStreamBuffer:
+ Collaboration diagram for cheprep::DeflateOutputStreamBuffer:

Public Member Functions

 DeflateOutputStreamBuffer (std::streambuf *buffer)
 
void init (bool compress)
 
void finish ()
 
virtual ~DeflateOutputStreamBuffer ()
 

Protected Member Functions

int overflow (int c=EOF)
 
bool flushOut ()
 
void putUI (unsigned int ui)
 
void putUS (unsigned short us)
 
void putUB (unsigned char ub)
 
void putS (const std::string s)
 
std::streampos pos ()
 
unsigned int getSize ()
 
unsigned int getCRC ()
 

Private Attributes

std::streambuf * buffer
 
unsigned int crc
 
unsigned int size
 
z_stream zStream
 
bool zStreamOpen
 
std::vector< char > in
 
std::vector< char > out
 

Static Private Attributes

static unsigned long crctable [256]
 
static const unsigned int inSize = 1000
 
static const unsigned int outSize = 1000
 

Detailed Description

Definition at line 19 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 19 of file DeflateOutputStreamBuffer.h

Constructor & Destructor Documentation

cheprep::DeflateOutputStreamBuffer::DeflateOutputStreamBuffer ( std::streambuf *  buffer)
cheprep::DeflateOutputStreamBuffer::~DeflateOutputStreamBuffer ( )
virtual

Definition at line 161 of file DeflateOutputStreamBuffer.cc.

View newest version in sPHENIX GitHub at line 161 of file DeflateOutputStreamBuffer.cc

Member Function Documentation

void cheprep::DeflateOutputStreamBuffer::finish ( )

Definition at line 128 of file DeflateOutputStreamBuffer.cc.

View newest version in sPHENIX GitHub at line 128 of file DeflateOutputStreamBuffer.cc

References z_stream_s::avail_out, deflate(), deflateEnd(), check_license::err(), false, flushOut(), z_stream_s::next_out, out, outSize, overflow(), Z_FINISH, Z_OK, Z_STREAM_END, zStream, and zStreamOpen.

Referenced by cheprep::GZIPOutputStreamBuffer::close(), and cheprep::ZipOutputStreamBuffer::closeEntry().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool cheprep::DeflateOutputStreamBuffer::flushOut ( )
protected

Definition at line 233 of file DeflateOutputStreamBuffer.cc.

View newest version in sPHENIX GitHub at line 233 of file DeflateOutputStreamBuffer.cc

References z_stream_s::avail_out, z_stream_s::next_out, out, outSize, and zStream.

Referenced by finish(), and overflow().

+ Here is the caller graph for this function:

unsigned int cheprep::DeflateOutputStreamBuffer::getCRC ( )
inlineprotected

Definition at line 71 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 71 of file DeflateOutputStreamBuffer.h

References crc.

Referenced by cheprep::ZipOutputStreamBuffer::closeEntry(), and cheprep::GZIPOutputStreamBuffer::writeTrailer().

+ Here is the caller graph for this function:

unsigned int cheprep::DeflateOutputStreamBuffer::getSize ( )
inlineprotected

Definition at line 67 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 67 of file DeflateOutputStreamBuffer.h

References size.

Referenced by cheprep::ZipOutputStreamBuffer::closeEntry(), and cheprep::GZIPOutputStreamBuffer::writeTrailer().

+ Here is the caller graph for this function:

void cheprep::DeflateOutputStreamBuffer::init ( bool  compress)

Definition at line 102 of file DeflateOutputStreamBuffer.cc.

View newest version in sPHENIX GitHub at line 102 of file DeflateOutputStreamBuffer.cc

References z_stream_s::avail_in, z_stream_s::avail_out, crc, deflateInit2, in, inSize, z_stream_s::next_in, z_stream_s::next_out, out, size, Z_DEFAULT_STRATEGY, Z_DEFLATED, Z_OK, zStream, and zStreamOpen.

Referenced by cheprep::GZIPOutputStreamBuffer::GZIPOutputStreamBuffer(), and cheprep::ZipOutputStreamBuffer::putNextEntry().

+ Here is the caller graph for this function:

int cheprep::DeflateOutputStreamBuffer::overflow ( int  c = EOF)
protected

Definition at line 171 of file DeflateOutputStreamBuffer.cc.

View newest version in sPHENIX GitHub at line 171 of file DeflateOutputStreamBuffer.cc

References z_stream_s::avail_in, z_stream_s::avail_out, c, crc, crctable, deflate(), DO1, DO8, check_license::err(), flushOut(), in, inSize, z_stream_s::next_in, z_stream_s::next_out, out, outSize, size, Z_NO_FLUSH, Z_OK, Z_STREAM_END, zStream, and zStreamOpen.

Referenced by finish(), cheprep::GZIPOutputStreamBuffer::overflow(), and cheprep::ZipOutputStreamBuffer::overflow().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::streampos cheprep::DeflateOutputStreamBuffer::pos ( )
inlineprotected

Definition at line 62 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 62 of file DeflateOutputStreamBuffer.h

Referenced by cheprep::ZipOutputStreamBuffer::close(), cheprep::ZipOutputStreamBuffer::closeEntry(), and cheprep::ZipOutputStreamBuffer::putNextEntry().

+ Here is the caller graph for this function:

void cheprep::DeflateOutputStreamBuffer::putS ( const std::string  s)
inlineprotected

Definition at line 58 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 58 of file DeflateOutputStreamBuffer.h

Referenced by cheprep::ZipOutputStreamBuffer::close(), cheprep::ZipOutputStreamBuffer::putNextEntry(), and cheprep::GZIPOutputStreamBuffer::writeHeader().

+ Here is the caller graph for this function:

void cheprep::DeflateOutputStreamBuffer::putUB ( unsigned char  ub)
inlineprotected

Definition at line 54 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 54 of file DeflateOutputStreamBuffer.h

Referenced by cheprep::GZIPOutputStreamBuffer::writeHeader().

+ Here is the caller graph for this function:

void cheprep::DeflateOutputStreamBuffer::putUI ( unsigned int  ui)
inlineprotected

Definition at line 38 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 38 of file DeflateOutputStreamBuffer.h

Referenced by cheprep::ZipOutputStreamBuffer::close(), cheprep::ZipOutputStreamBuffer::closeEntry(), cheprep::ZipOutputStreamBuffer::putNextEntry(), cheprep::GZIPOutputStreamBuffer::writeHeader(), and cheprep::GZIPOutputStreamBuffer::writeTrailer().

+ Here is the caller graph for this function:

void cheprep::DeflateOutputStreamBuffer::putUS ( unsigned short  us)
inlineprotected

Definition at line 47 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 47 of file DeflateOutputStreamBuffer.h

References us.

Referenced by cheprep::ZipOutputStreamBuffer::close(), and cheprep::ZipOutputStreamBuffer::putNextEntry().

+ Here is the caller graph for this function:

Member Data Documentation

std::streambuf* cheprep::DeflateOutputStreamBuffer::buffer
private

Definition at line 77 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 77 of file DeflateOutputStreamBuffer.h

unsigned int cheprep::DeflateOutputStreamBuffer::crc
private

Definition at line 79 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 79 of file DeflateOutputStreamBuffer.h

Referenced by getCRC(), init(), and overflow().

unsigned long cheprep::DeflateOutputStreamBuffer::crctable
staticprivate

Definition at line 76 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 76 of file DeflateOutputStreamBuffer.h

Referenced by overflow().

std::vector<char> cheprep::DeflateOutputStreamBuffer::in
private

Definition at line 88 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 88 of file DeflateOutputStreamBuffer.h

Referenced by init(), and overflow().

const unsigned int cheprep::DeflateOutputStreamBuffer::inSize = 1000
staticprivate

Definition at line 83 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 83 of file DeflateOutputStreamBuffer.h

Referenced by init(), and overflow().

std::vector<char> cheprep::DeflateOutputStreamBuffer::out
private

Definition at line 89 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 89 of file DeflateOutputStreamBuffer.h

Referenced by finish(), flushOut(), init(), and overflow().

const unsigned int cheprep::DeflateOutputStreamBuffer::outSize = 1000
staticprivate

Definition at line 84 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 84 of file DeflateOutputStreamBuffer.h

Referenced by finish(), flushOut(), and overflow().

unsigned int cheprep::DeflateOutputStreamBuffer::size
private

Definition at line 80 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 80 of file DeflateOutputStreamBuffer.h

Referenced by getSize(), init(), and overflow().

z_stream cheprep::DeflateOutputStreamBuffer::zStream
private

Definition at line 85 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 85 of file DeflateOutputStreamBuffer.h

Referenced by DeflateOutputStreamBuffer(), finish(), flushOut(), init(), and overflow().

bool cheprep::DeflateOutputStreamBuffer::zStreamOpen
private

Definition at line 86 of file DeflateOutputStreamBuffer.h.

View newest version in sPHENIX GitHub at line 86 of file DeflateOutputStreamBuffer.h

Referenced by finish(), init(), and overflow().


The documentation for this class was generated from the following files: