CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
compression.cc File Reference
#include "cvmfs_config.h"
#include "compression.h"
#include <alloca.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <algorithm>
#include <cassert>
#include <cstring>
#include "hash.h"
#include "logging.h"
#include "platform.h"
#include "smalloc.h"
#include "util/exception.h"
#include "util/posix.h"
Include dependency graph for compression.cc:

Go to the source code of this file.

Namespaces

 zlib
 

Functions

static bool CopyFile2File (FILE *fsrc, FILE *fdest)
 
bool CopyPath2File (const std::string &src, FILE *fdest)
 
bool CopyPath2Path (const string &src, const string &dest)
 
bool CopyMem2File (const unsigned char *buffer, const unsigned buffer_size, FILE *fdest)
 
bool CopyMem2Path (const unsigned char *buffer, const unsigned buffer_size, const string &path)
 
bool CopyPath2Mem (const 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::DecompressZStream2Sink (const void *buf, const int64_t size, z_stream *strm, cvmfs::Sink *sink)
 
StreamStates zlib::DecompressZStream2File (const void *buf, const int64_t size, z_stream *strm, FILE *f)
 
bool zlib::CompressPath2Path (const string &src, const string &dest)
 
bool zlib::CompressPath2Path (const string &src, const string &dest, shash::Any *compressed_hash)
 
bool zlib::DecompressPath2Path (const string &src, const string &dest)
 
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::CompressPath2Null (const string &src, shash::Any *compressed_hash)
 
bool zlib::CompressFile2File (FILE *fsrc, FILE *fdest)
 
bool zlib::CompressPath2File (const string &src, FILE *fdest, shash::Any *compressed_hash)
 
bool zlib::CompressFile2File (FILE *fsrc, FILE *fdest, shash::Any *compressed_hash)
 
bool zlib::DecompressFile2File (FILE *fsrc, FILE *fdest)
 
bool zlib::DecompressPath2File (const 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::kBufferSize = 32768
 

Function Documentation

static bool CopyFile2File ( FILE *  fsrc,
FILE *  fdest 
)
static

Definition at line 32 of file compression.cc.

Referenced by CopyPath2File(), and CopyPath2Path().

Here is the caller graph for this function:

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 string &  path 
)

Definition at line 94 of file compression.cc.

Referenced by main().

Here is the caller graph for this function:

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 string &  path,
unsigned char **  buffer,
unsigned *  buffer_size 
)

Definition at line 108 of file compression.cc.

Referenced by signature::SignatureManager::LoadBlacklist().

Here is the caller graph for this function:

bool CopyPath2Path ( const string &  src,
const string &  dest 
)

Definition at line 63 of file compression.cc.

Referenced by swissknife::CommandFileStats::CatalogCallback(), PosixCacheManager::CommitTxn(), main(), and swissknife::CommandMigrate::UpdateUndoTags().

Here is the call graph for this function:

Here is the caller graph for this function: