MOAL.data_structures.hashes package¶
Submodules¶
MOAL.data_structures.hashes.hash_list module¶
-
class
MOAL.data_structures.hashes.hash_list.HashList(filedata, chunk_size=4)[source]¶ Bases:
MOAL.data_structures.hashes.hashtable.NaiveHashTableStores a list of computed hashes for each block of data (specified by offset) for a given string block representing a file-like object.
MOAL.data_structures.hashes.hashtable module¶
-
class
MOAL.data_structures.hashes.hashtable.NaiveHashTable[source]¶ Bases:
object-
__delitem__(key)¶
-
__getitem__(key)¶
-
__init__()¶
-
__iter__()¶
-
__setitem__(key, value)¶
-
_naive_hash_value(val)¶ Compute an integer signature relative to the value given. This is very naive and will result in collisions in a short matter of time. Only here for demo purposes, as this data structure is not performant for production use.
-
fill_to(x)¶
-
fnv_offset_basis= 14695981039346656037L¶
-
fnv_prime= 1099511628211¶
-
hash(key)¶ Super naive hashing function - collisions are highly probable.
-
hash_fnv1(data)¶
-
hash_fnv1a(data)¶
-
MOAL.data_structures.hashes.rolling_hash module¶
-
MOAL.data_structures.hashes.rolling_hash.DEBUG= False¶