5 #ifndef CVMFS_INGESTION_CHUNK_DETECTOR_H_
6 #define CVMFS_INGESTION_CHUNK_DETECTOR_H_
8 #include <gtest/gtest_prod.h>
46 virtual uint64_t
NoCut(uint64_t ) {
return 0; }
95 const uint64_t average_chunk_size,
96 const uint64_t maximal_chunk_size);
116 inline void xor32(
const unsigned char byte) {
138 #endif // CVMFS_INGESTION_CHUNK_DETECTOR_H_
virtual uint64_t DoFindNextCutMark(BlockItem *buffer)
void xor32(const unsigned char byte)
const uint64_t chunk_size_
virtual uint64_t DoCut(const uint64_t offset)
bool MightFindChunks(const uint64_t size) const
const uint64_t maximal_chunk_size_
static const int32_t kMagicNumber
virtual uint64_t NoCut(const uint64_t offset)
static const unsigned kXor32Window
FRIEND_TEST(T_ChunkDetectors, Xor32)
virtual uint64_t DoFindNextCutMark(BlockItem *buffer)
const uint64_t minimal_chunk_size_
bool MightFindChunks(uint64_t size) const
uint64_t FindNextCutMark(BlockItem *block)
virtual uint64_t NoCut(uint64_t)
Xor32Detector(const uint64_t minimal_chunk_size, const uint64_t average_chunk_size, const uint64_t maximal_chunk_size)
virtual uint64_t DoCut(uint64_t offset)
StaticOffsetDetector(uint64_t s)
virtual bool MightFindChunks(uint64_t size) const =0
uint64_t last_cut() const
const uint64_t average_chunk_size_
virtual uint64_t DoFindNextCutMark(BlockItem *block)=0