![]() |
CernVM-FS
2.12.0
|
#include "compression/compression.h"
#include <alloca.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <algorithm>
#include <cassert>
#include <cstring>
#include "crypto/hash.h"
#include "util/exception.h"
#include "util/logging.h"
#include "util/platform.h"
#include "util/posix.h"
#include "util/smalloc.h"
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 |
|
static |
Definition at line 32 of file compression.cc.
Referenced by CopyPath2File(), and CopyPath2Path().
bool CopyMem2File | ( | const unsigned char * | buffer, |
const unsigned | buffer_size, | ||
FILE * | fdest | ||
) |
Definition at line 86 of file compression.cc.
Referenced by swissknife::StoreBuffer().
bool CopyMem2Path | ( | const unsigned char * | buffer, |
const unsigned | buffer_size, | ||
const string & | path | ||
) |
Definition at line 94 of file compression.cc.
Referenced by main().
bool CopyPath2File | ( | const std::string & | src, |
FILE * | fdest | ||
) |
Definition at line 46 of file compression.cc.
Referenced by catalog::WritableCatalogManager::CopyCatalogToLocalCache(), catalog::SimpleCatalogManager::CopyCatalogToTempFile(), LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::Fetch(), and swissknife::CommandCheck::FetchPath().
bool CopyPath2Mem | ( | const string & | path, |
unsigned char ** | buffer, | ||
unsigned * | buffer_size | ||
) |
Definition at line 108 of file compression.cc.
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().