CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
zlib::ZlibCompressor Class Reference

#include <compression.h>

Inheritance diagram for zlib::ZlibCompressor:
Collaboration diagram for zlib::ZlibCompressor:

Public Member Functions

 ZlibCompressor (const Algorithms &alg)
 
 ZlibCompressor (const ZlibCompressor &other)
 
 ~ZlibCompressor ()
 
bool Deflate (const bool flush, unsigned char **inbuf, size_t *inbufsize, unsigned char **outbuf, size_t *outbufsize)
 
size_t DeflateBound (const size_t bytes)
 
CompressorClone ()
 
- Public Member Functions inherited from zlib::Compressor
 Compressor (const Algorithms &)
 
virtual ~Compressor ()
 
- Public Member Functions inherited from PolymorphicConstructionImpl< Compressor, Algorithms, void >
virtual ~PolymorphicConstructionImpl ()
 

Static Public Member Functions

static bool WillHandle (const zlib::Algorithms &alg)
 
- Static Public Member Functions inherited from zlib::Compressor
static void RegisterPlugins ()
 
- Static Public Member Functions inherited from PolymorphicConstruction< Compressor, Algorithms >
static IntrospectionData Introspect ()
 
- Static Public Member Functions inherited from PolymorphicConstructionImpl< Compressor, Algorithms, void >
static Compressor * Construct (const Algorithms &param)
 

Private Attributes

z_stream stream_
 

Additional Inherited Members

- Public Types inherited from PolymorphicConstruction< Compressor, Algorithms >
typedef std::vector< void > IntrospectionData
 
- Protected Types inherited from PolymorphicConstructionImpl< Compressor, Algorithms, void >
typedef AbstractFactory
< Compressor, Algorithms, void > 
Factory
 
typedef std::vector< Factory * > RegisteredPlugins
 
- Protected Member Functions inherited from PolymorphicConstructionImpl< Compressor, Algorithms, void >
virtual bool Initialize ()
 
- Static Protected Member Functions inherited from PolymorphicConstructionImpl< Compressor, Algorithms, void >
static void LazilyRegisterPlugins ()
 
static void RegisterPlugin ()
 
- Static Protected Attributes inherited from PolymorphicConstructionImpl< Compressor, Algorithms, void >
static RegisteredPlugins registered_plugins_
 

Detailed Description

Definition at line 98 of file compression.h.

Constructor & Destructor Documentation

zlib::ZlibCompressor::ZlibCompressor ( const Algorithms alg)
explicit

Definition at line 872 of file compression.cc.

Referenced by Clone().

Here is the call graph for this function:

Here is the caller graph for this function:

zlib::ZlibCompressor::ZlibCompressor ( const ZlibCompressor other)
zlib::ZlibCompressor::~ZlibCompressor ( )

Definition at line 927 of file compression.cc.

Here is the call graph for this function:

Member Function Documentation

Compressor * zlib::ZlibCompressor::Clone ( )
virtual

Implements zlib::Compressor.

Definition at line 885 of file compression.cc.

Here is the call graph for this function:

bool zlib::ZlibCompressor::Deflate ( const bool  flush,
unsigned char **  inbuf,
size_t *  inbufsize,
unsigned char **  outbuf,
size_t *  outbufsize 
)
virtual

Deflate function. The arguments and returns closely match the input and output of the zlib deflate function. Input:

  • outbuf - Output buffer to write the compressed data.
  • outbufsize - Size of the output buffer
  • inbuf - Input data to be compressed
  • inbufsize - Size of the input buffer
  • flush - Whether the compression stream should be flushed / finished Upon return: returns: true - if done compressing, false otherwise
  • outbuf - output buffer pointer (unchanged from input)
  • outbufsize - The number of bytes used in the outbuf
  • inbuf - Pointer to the next byte of input to read in
  • inbufsize - the remaining bytes of input to read in.
  • flush - unchanged from input

Implements zlib::Compressor.

Definition at line 896 of file compression.cc.

Here is the call graph for this function:

size_t zlib::ZlibCompressor::DeflateBound ( const size_t  bytes)
virtual

Return an upper bound on the number of bytes required in order to compress an input number of bytes. Returns: Upper bound on the number of bytes required to compress.

Implements zlib::Compressor.

Definition at line 933 of file compression.cc.

bool zlib::ZlibCompressor::WillHandle ( const zlib::Algorithms alg)
static

Definition at line 867 of file compression.cc.

Member Data Documentation

z_stream zlib::ZlibCompressor::stream_
private

Definition at line 112 of file compression.h.

Referenced by Clone(), Deflate(), DeflateBound(), ZlibCompressor(), and ~ZlibCompressor().


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