5 #ifndef CVMFS_COMPRESSION_COMPRESSION_H_
6 #define CVMFS_COMPRESSION_COMPRESSION_H_
23 bool CopyPath2Path(
const std::string &src,
const std::string &dest);
25 bool CopyMem2Path(
const unsigned char *buffer,
const unsigned buffer_size,
26 const std::string &path);
27 bool CopyMem2File(
const unsigned char *buffer,
const unsigned buffer_size,
30 unsigned char **buffer,
unsigned *buffer_size);
82 virtual bool Deflate(
const bool flush,
83 unsigned char **inbuf,
size_t *inbufsize,
84 unsigned char **outbuf,
size_t *outbufsize) = 0;
105 unsigned char **inbuf,
size_t *inbufsize,
106 unsigned char **outbuf,
size_t *outbufsize);
120 unsigned char **inbuf,
size_t *inbufsize,
121 unsigned char **outbuf,
size_t *outbufsize);
138 const void *buf,
const int64_t
size,
const bool eof,
141 z_stream *strm, FILE *f);
153 uint64_t*
size = NULL);
166 void **out_buf, uint64_t *out_size);
168 void **out_buf, uint64_t *out_size);
172 #endif // CVMFS_COMPRESSION_COMPRESSION_H_
bool CompressPath2Null(const string &src, shash::Any *compressed_hash)
Compressor(const Algorithms &)
Algorithms ParseCompressionAlgorithm(const std::string &algorithm_option)
StreamStates DecompressZStream2Sink(const void *buf, const int64_t size, z_stream *strm, cvmfs::Sink *sink)
virtual bool Deflate(const bool flush, unsigned char **inbuf, size_t *inbufsize, unsigned char **outbuf, size_t *outbufsize)=0
bool CompressPath2File(const string &src, FILE *fdest, shash::Any *compressed_hash)
EchoCompressor(const Algorithms &alg)
bool CopyMem2File(const unsigned char *buffer, const unsigned buffer_size, FILE *fdest)
static bool WillHandle(const zlib::Algorithms &alg)
void DecompressInit(z_stream *strm)
virtual size_t DeflateBound(const size_t bytes)=0
bool DecompressMem2Mem(const void *buf, const int64_t size, void **out_buf, uint64_t *out_size)
StreamStates DecompressZStream2File(const void *buf, const int64_t size, z_stream *strm, FILE *f)
std::string AlgorithmName(const zlib::Algorithms alg)
bool Deflate(const bool flush, unsigned char **inbuf, size_t *inbufsize, unsigned char **outbuf, size_t *outbufsize)
void DecompressFini(z_stream *strm)
bool CopyPath2Path(const string &src, const string &dest)
bool CopyPath2Mem(const string &path, unsigned char **buffer, unsigned *buffer_size)
bool CopyPath2File(const std::string &src, FILE *fdest)
StreamStates CompressZStream2Null(const void *buf, const int64_t size, const bool eof, z_stream *strm, shash::ContextPtr *hash_context)
bool DecompressFile2File(FILE *fsrc, FILE *fdest)
bool CompressFile2File(FILE *fsrc, FILE *fdest)
size_t DeflateBound(const size_t bytes)
bool CopyMem2Path(const unsigned char *buffer, const unsigned buffer_size, const string &path)
static void RegisterPlugins()
bool CompressFd2Null(int fd_src, shash::Any *compressed_hash, uint64_t *processed_bytes)
void CompressFini(z_stream *strm)
bool DecompressPath2File(const string &src, FILE *fdest)
void CompressInit(z_stream *strm)
bool Deflate(const bool flush, unsigned char **inbuf, size_t *inbufsize, unsigned char **outbuf, size_t *outbufsize)
static bool WillHandle(const zlib::Algorithms &alg)
bool CompressFile2Null(FILE *fsrc, shash::Any *compressed_hash)
bool CompressMem2File(const unsigned char *buf, const size_t size, FILE *fdest, shash::Any *compressed_hash)
bool DecompressPath2Path(const string &src, const string &dest)
bool CompressMem2Mem(const void *buf, const int64_t size, void **out_buf, uint64_t *out_size)
virtual Compressor * Clone()=0
ZlibCompressor(const Algorithms &alg)
size_t DeflateBound(const size_t bytes)
bool CompressPath2Path(const string &src, const string &dest)