![]() |
CernVM-FS
2.12.0
|
#include <compression.h>
Public Member Functions | |
Compressor (const Algorithms &) | |
virtual | ~Compressor () |
virtual bool | Deflate (const bool flush, unsigned char **inbuf, size_t *inbufsize, unsigned char **outbuf, size_t *outbufsize)=0 |
virtual size_t | DeflateBound (const size_t bytes)=0 |
virtual Compressor * | Clone ()=0 |
![]() | |
virtual | ~PolymorphicConstructionImpl () |
Static Public Member Functions | |
static void | RegisterPlugins () |
![]() | |
static IntrospectionData | Introspect () |
![]() | |
static Compressor * | Construct (const Algorithms ¶m) |
Additional Inherited Members | |
![]() | |
typedef std::vector< void > | IntrospectionData |
![]() | |
typedef AbstractFactory < Compressor, Algorithms, void > | Factory |
typedef std::vector< Factory * > | RegisteredPlugins |
![]() | |
virtual bool | Initialize () |
![]() | |
static void | LazilyRegisterPlugins () |
static void | RegisterPlugin () |
![]() | |
static RegisteredPlugins | registered_plugins_ |
Abstract Compression class which is inherited by implementations of compression engines such as zlib.
In order to add a new compression method, you simply need to add a new class which is a sub-class of the Compressor. The subclass needs to implement the Deflate, DeflateBound, Clone, and WillHandle functions. For information on the WillHandle function, read up on the PolymorphicConstruction class. The new sub-class must be listed in the implementation of the Compressor::RegisterPlugins function.
Definition at line 61 of file compression.h.
|
inlineexplicit |
Definition at line 63 of file compression.h.
|
inlinevirtual |
Definition at line 64 of file compression.h.
|
pure virtual |
Implemented in zlib::EchoCompressor, and zlib::ZlibCompressor.
|
pure virtual |
Deflate function. The arguments and returns closely match the input and output of the zlib deflate function. Input:
Implemented in zlib::EchoCompressor, and zlib::ZlibCompressor.
Referenced by swissknife::CommandGraft::ChecksumFdWithChunks().
|
pure 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.
Implemented in zlib::EchoCompressor, and zlib::ZlibCompressor.
|
static |
Definition at line 858 of file compression.cc.