Lines Matching refs:BlockHash
17 #include "blockhash.h"
29 BlockHash::BlockHash(const char* source_data,
39 BlockHash::~BlockHash() { }
44 VCD_COMPILE_ASSERT(BlockHash::kBlockSize >= 2, kBlockSize_must_be_at_least_2);
53 VCD_COMPILE_ASSERT((BlockHash::kBlockSize & (BlockHash::kBlockSize - 1)) == 0,
56 bool BlockHash::Init(bool populate_hash_table) {
60 VCD_DFATAL << "Init() called twice for same BlockHash object" << VCD_ENDL;
81 const BlockHash* BlockHash::CreateDictionaryHash(const char* dictionary_data,
83 BlockHash* new_dictionary_hash = new BlockHash(dictionary_data,
94 BlockHash* BlockHash::CreateTargetHash(const char* target_data,
97 BlockHash* new_target_hash = new BlockHash(target_data,
109 size_t BlockHash::CalcTableSize(const size_t dictionary_size) {
153 void BlockHash::AddBlock(uint32_t hash_value) {
155 VCD_DFATAL << "BlockHash::AddBlock() called before BlockHash::Init()"
164 VCD_DFATAL << "BlockHash::AddBlock() called"
171 VCD_DFATAL << "Internal error in BlockHash::AddBlock(): "
187 VCD_DFATAL << "Internal error in BlockHash::AddBlock(): "
200 void BlockHash::AddAllBlocks() {
204 void BlockHash::AddAllBlocksThroughIndex(int end_index) {
206 VCD_DFATAL << "BlockHash::AddAllBlocksThroughIndex() called"
213 VCD_DFATAL << "BlockHash::AddAllBlocksThroughIndex() called"
235 VCD_COMPILE_ASSERT((BlockHash::kBlockSize % sizeof(uword_t)) == 0,
272 static const size_t kWordsPerBlock = BlockHash::kBlockSize / sizeof(uword_t);
276 bool BlockHash::BlockCompareWords(const char* block1, const char* block2) {
290 return memcmp(block1, block2, BlockHash::kBlockSize) == 0;
294 bool BlockHash::BlockContentsMatch(const char* block1, const char* block2) {
298 inline int BlockHash::SkipNonMatchingBlocks(int block_number,
315 inline int BlockHash::FirstMatchingBlockInline(uint32_t hash_value,
321 int BlockHash::FirstMatchingBlock(uint32_t hash_value,
326 int BlockHash::NextMatchingBlock(int block_number,
341 inline bool BlockHash::TooManyMatches(int* match_counter) {
350 int BlockHash::MatchingBytesToLeft(const char* source_match_start,
371 int BlockHash::MatchingBytesToRight(const char* source_match_end,
392 void BlockHash::FindBestMatch(uint32_t hash_value,