CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
compression.h File Reference
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <string>
#include "duplex_zlib.h"
#include "sink.h"
#include "util/plugin.h"
Include dependency graph for compression.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  zlib::Compressor
 
class  zlib::ZlibCompressor
 
class  zlib::EchoCompressor
 

Namespaces

 shash
 
 zlib
 

Enumerations

enum  zlib::StreamStates { zlib::kStreamDataError = 0, zlib::kStreamIOError, zlib::kStreamContinue, zlib::kStreamEnd }
 
enum  zlib::Algorithms { zlib::kZlibDefault = 0, zlib::kNoCompression }
 

Functions

bool CopyPath2Path (const std::string &src, const std::string &dest)
 
bool CopyPath2File (const std::string &src, FILE *fdest)
 
bool CopyMem2Path (const unsigned char *buffer, const unsigned buffer_size, const std::string &path)
 
bool CopyMem2File (const unsigned char *buffer, const unsigned buffer_size, FILE *fdest)
 
bool CopyPath2Mem (const std::string &path, unsigned char **buffer, unsigned *buffer_size)
 
Algorithms zlib::ParseCompressionAlgorithm (const std::string &algorithm_option)
 
std::string zlib::AlgorithmName (const zlib::Algorithms alg)
 
void zlib::CompressInit (z_stream *strm)
 
void zlib::DecompressInit (z_stream *strm)
 
void zlib::CompressFini (z_stream *strm)
 
void zlib::DecompressFini (z_stream *strm)
 
StreamStates zlib::CompressZStream2Null (const void *buf, const int64_t size, const bool eof, z_stream *strm, shash::ContextPtr *hash_context)
 
StreamStates zlib::DecompressZStream2File (const void *buf, const int64_t size, z_stream *strm, FILE *f)
 
StreamStates zlib::DecompressZStream2Sink (const void *buf, const int64_t size, z_stream *strm, cvmfs::Sink *sink)
 
bool zlib::CompressPath2Path (const std::string &src, const std::string &dest)
 
bool zlib::CompressPath2Path (const std::string &src, const std::string &dest, shash::Any *compressed_hash)
 
bool zlib::DecompressPath2Path (const std::string &src, const std::string &dest)
 
bool zlib::CompressPath2Null (const std::string &src, shash::Any *compressed_hash)
 
bool zlib::CompressFile2Null (FILE *fsrc, shash::Any *compressed_hash)
 
bool zlib::CompressFd2Null (int fd_src, shash::Any *compressed_hash, uint64_t *processed_bytes)
 
bool zlib::CompressFile2File (FILE *fsrc, FILE *fdest)
 
bool zlib::CompressFile2File (FILE *fsrc, FILE *fdest, shash::Any *compressed_hash)
 
bool zlib::CompressPath2File (const std::string &src, FILE *fdest, shash::Any *compressed_hash)
 
bool zlib::DecompressFile2File (FILE *fsrc, FILE *fdest)
 
bool zlib::DecompressPath2File (const std::string &src, FILE *fdest)
 
bool zlib::CompressMem2File (const unsigned char *buf, const size_t size, FILE *fdest, shash::Any *compressed_hash)
 
bool zlib::CompressMem2Mem (const void *buf, const int64_t size, void **out_buf, uint64_t *out_size)
 
bool zlib::DecompressMem2Mem (const void *buf, const int64_t size, void **out_buf, uint64_t *out_size)
 

Variables

const unsigned zlib::kZChunk = 16384
 

Function Documentation

bool CopyMem2File ( const unsigned char *  buffer,
const unsigned  buffer_size,
FILE *  fdest 
)

Definition at line 86 of file compression.cc.

Referenced by swissknife::StoreBuffer().

Here is the caller graph for this function:

bool CopyMem2Path ( const unsigned char *  buffer,
const unsigned  buffer_size,
const std::string &  path 
)
bool CopyPath2File ( const std::string &  src,
FILE *  fdest 
)

Definition at line 46 of file compression.cc.

Referenced by LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::Fetch(), and swissknife::CommandCheck::FetchPath().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CopyPath2Mem ( const std::string &  path,
unsigned char **  buffer,
unsigned *  buffer_size 
)
bool CopyPath2Path ( const std::string &  src,
const std::string &  dest 
)