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

Classes

class  Compressor
 
class  ZlibCompressor
 
class  EchoCompressor
 

Enumerations

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

Functions

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

Variables

const unsigned kBufferSize = 32768
 
const unsigned kZChunk = 16384
 

Enumeration Type Documentation

Enumerator
kZlibDefault 
kNoCompression 

Definition at line 44 of file compression.h.

Enumerator
kStreamDataError 
kStreamIOError 
kStreamContinue 
kStreamEnd 

Definition at line 36 of file compression.h.

Function Documentation

std::string zlib::AlgorithmName ( const zlib::Algorithms  alg)

Definition at line 158 of file compression.cc.

Referenced by CompressionMagicXattr::FinalizeValue(), and swissknife::CommandGraft::Publish().

Here is the caller graph for this function:

bool zlib::CompressFd2Null ( int  fd_src,
shash::Any compressed_hash,
uint64_t *  processed_bytes 
)

Definition at line 453 of file compression.cc.

Referenced by MainCheck().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zlib::CompressFile2File ( FILE *  fsrc,
FILE *  fdest 
)

Definition at line 525 of file compression.cc.

Referenced by CompressPath2File(), and CompressPath2Path().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zlib::CompressFile2File ( FILE *  fsrc,
FILE *  fdest,
shash::Any compressed_hash 
)

Definition at line 586 of file compression.cc.

Here is the call graph for this function:

bool zlib::CompressFile2Null ( FILE *  fsrc,
shash::Any compressed_hash 
)

Definition at line 401 of file compression.cc.

Referenced by CompressPath2Null().

Here is the call graph for this function:

Here is the caller graph for this function:

void zlib::CompressFini ( z_stream *  strm)

Definition at line 196 of file compression.cc.

Referenced by CacheManager::ChecksumFd(), CompressFd2Null(), CompressFile2File(), CompressFile2Null(), CompressMem2File(), and CompressMem2Mem().

Here is the caller graph for this function:

void zlib::CompressInit ( z_stream *  strm)

Definition at line 174 of file compression.cc.

Referenced by CacheManager::ChecksumFd(), CompressFd2Null(), CompressFile2File(), CompressFile2Null(), CompressMem2File(), and CompressMem2Mem().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zlib::CompressMem2File ( const unsigned char *  buf,
const size_t  size,
FILE *  fdest,
shash::Any compressed_hash 
)

Definition at line 678 of file compression.cc.

Referenced by swissknife::StoreBuffer().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zlib::CompressMem2Mem ( const void *  buf,
const int64_t  size,
void **  out_buf,
uint64_t *  out_size 
)

User of this function has to free out_buf.

Definition at line 739 of file compression.cc.

Referenced by catalog::VirtualCatalog::CreateNestedCatalogMarker(), and catalog::CatalogBalancer< CatalogMgrT >::MakeEmptyDirectoryEntryBase().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zlib::CompressPath2File ( const std::string &  src,
FILE *  fdest,
shash::Any compressed_hash 
)
bool zlib::CompressPath2File ( const string &  src,
FILE *  fdest,
shash::Any compressed_hash 
)

Definition at line 573 of file compression.cc.

Here is the call graph for this function:

bool zlib::CompressPath2Null ( const std::string &  src,
shash::Any compressed_hash 
)
bool zlib::CompressPath2Null ( const string &  src,
shash::Any compressed_hash 
)

Definition at line 515 of file compression.cc.

Referenced by catalog::WritableCatalogManager::SnapshotCatalogsSerialized().

Here is the call graph for this function:

Here is the caller graph for this function:

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::CompressPath2Path ( const string &  src,
const string &  dest 
)

Definition at line 318 of file compression.cc.

Referenced by catalog::WritableCatalogManager::CreateRepository().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zlib::CompressPath2Path ( const string &  src,
const string &  dest,
shash::Any compressed_hash 
)

Definition at line 344 of file compression.cc.

Here is the call graph for this function:

StreamStates zlib::CompressZStream2Null ( const void *  buf,
const int64_t  size,
const bool  eof,
z_stream *  strm,
shash::ContextPtr hash_context 
)

Definition at line 206 of file compression.cc.

Referenced by CacheManager::ChecksumFd().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zlib::DecompressFile2File ( FILE *  fsrc,
FILE *  fdest 
)

Definition at line 640 of file compression.cc.

Referenced by DecompressPath2File(), and DecompressPath2Path().

Here is the call graph for this function:

Here is the caller graph for this function:

void zlib::DecompressFini ( z_stream *  strm)

Definition at line 201 of file compression.cc.

Referenced by DecompressFile2File(), DecompressMem2Mem(), and download::DownloadManager::VerifyAndFinalize().

Here is the caller graph for this function:

void zlib::DecompressInit ( z_stream *  strm)

Definition at line 185 of file compression.cc.

Referenced by DecompressFile2File(), DecompressMem2Mem(), download::DownloadManager::InitializeRequest(), and download::DownloadManager::VerifyAndFinalize().

Here is the call graph for this function:

Here is the caller graph for this function:

bool zlib::DecompressMem2Mem ( const void *  buf,
const int64_t  size,
void **  out_buf,
uint64_t *  out_size 
)

User of this function has to free out_buf.

Definition at line 797 of file compression.cc.

Here is the call graph for this function:

bool zlib::DecompressPath2File ( const std::string &  src,
FILE *  fdest 
)
bool zlib::DecompressPath2File ( const string &  src,
FILE *  fdest 
)

Definition at line 667 of file compression.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool zlib::DecompressPath2Path ( const std::string &  src,
const std::string &  dest 
)
bool zlib::DecompressPath2Path ( const string &  src,
const string &  dest 
)

Definition at line 381 of file compression.cc.

Referenced by swissknife::CommandCheck::DecompressPiece(), swissknife::CommandPull::Main(), and swissknife::CommandPull::Pull().

Here is the call graph for this function:

Here is the caller graph for this function:

StreamStates zlib::DecompressZStream2File ( const void *  buf,
const int64_t  size,
z_stream *  strm,
FILE *  f 
)

Definition at line 275 of file compression.cc.

Referenced by DecompressFile2File().

Here is the call graph for this function:

Here is the caller graph for this function:

StreamStates zlib::DecompressZStream2Sink ( const void *  buf,
const int64_t  size,
z_stream *  strm,
cvmfs::Sink sink 
)

Definition at line 234 of file compression.cc.

Referenced by download::CallbackCurlData().

Here is the call graph for this function:

Here is the caller graph for this function:

Algorithms zlib::ParseCompressionAlgorithm ( const std::string &  algorithm_option)

Aborts if string doesn't match any of the algorithms.

Definition at line 148 of file compression.cc.

Referenced by publish::SyncItem::CheckGraft(), swissknife::CommandGraft::Main(), swissknife::Ingest::Main(), swissknife::CommandSync::Main(), and publish::SettingsTransaction::SetCompressionAlgorithm().

Here is the caller graph for this function:

Variable Documentation