openMSX

Calculate a tigertreehash. More...
#include <TigerTree.hh>
Public Member Functions  
TigerTree (TTData &data, size_t dataSize, const std::string &name)  
Create TigerTree calculator for the given (abstract) data block of given size. More...  
const TigerHash &  calcHash (const std::function< void(size_t, size_t)> &progressCallback) 
Calculate the hash value. More...  
void  notifyChange (size_t offset, size_t len, time_t time) 
Inform this calculator about changes in the input data. More...  
Static Public Attributes  
static constexpr size_t  BLOCK_SIZE = 64 * 1024 
Calculate a tigertreehash.
Calculation can be done incrementally, so recalculating the hash after a (small) modification of the input is efficient.
Definition at line 72 of file TigerTree.hh.
openmsx::TigerTree::TigerTree  (  TTData &  data, 
size_t  dataSize,  
const std::string &  name  
) 
Create TigerTree calculator for the given (abstract) data block of given size.
Definition at line 45 of file TigerTree.cc.
const TigerHash & openmsx::TigerTree::calcHash  (  const std::function< void(size_t, size_t)> &  progressCallback  ) 
void openmsx::TigerTree::notifyChange  (  size_t  offset, 
size_t  len,  
time_t  time  
) 
Inform this calculator about changes in the input data.
This is used to (not) skip recalculations on future calcHash() calls. So it's crucial this calculator is informed about all changes in the input.
Definition at line 57 of file TigerTree.cc.
References BLOCK_SIZE, openmsx::TTCacheEntry::numNodesValid, openmsx::TTCacheEntry::time, and openmsx::TTCacheEntry::valid.
Referenced by TEST_CASE().

staticconstexpr 
Definition at line 75 of file TigerTree.hh.
Referenced by notifyChange(), and TEST_CASE().