Lines Matching refs:BlockHash
17 #include "blockhash.h"
28 const int kBlockSize = BlockHash::kBlockSize;
36 dh_.reset(BlockHash::CreateDictionaryHash(sample_text,
38 th_.reset(BlockHash::CreateTargetHash(sample_text, strlen(sample_text), 0));
43 // BlockHashTest is a friend to BlockHash. Expose the protected functions
46 return BlockHash::BlockContentsMatch(block1, block2);
49 int FirstMatchingBlock(const BlockHash& block_hash,
55 int NextMatchingBlock(const BlockHash& block_hash,
64 return BlockHash::MatchingBytesToLeft(source_match_start,
72 return BlockHash::MatchingBytesToRight(source_match_end,
235 std::auto_ptr<const BlockHash> dh_; // hash table is populated at startup
236 std::auto_ptr<BlockHash> th_; // hash table not populated;
239 BlockHash::Match best_match_;
332 if (!BlockHash::BlockCompareWords(block1, block2)) {
350 if (!BlockHash::BlockContentsMatch(block1, block2)) {
367 std::cout << "BlockHash::BlockCompareWords: "
369 std::cout << "BlockHash::BlockContentsMatch: "
392 // The two strings passed to BlockHash::MatchingBytesToLeft do have matching
394 // or negative, BlockHash::MatchingBytesToLeft should not read from the strings
504 // Makefile.in, and reconstructing the Makefile. That will cause blockhash.cc
531 // In practice, BlockHash::BlockContentsMatch will only be called
726 BlockHash zero_sized_hash(sample_text, 0, 0);
738 BlockHash bh(sample_text, strlen(sample_text), 0);
744 BlockHash bh(sample_text, strlen(sample_text), 0);
774 BlockHash th2(sample_text, strlen(sample_text), 0x10000);
823 BlockHash many_matches_hash(sample_text_many_matches,
888 // (see BlockHash::kMaxMatchesToCheck for details) is not working.
893 BlockHash huge_bh(huge_dictionary, kTestSize, 0);