Skip to content

Commit

Permalink
Merge pull request #47 from barrust/barrust-load-bloom
Browse files Browse the repository at this point in the history
Fix loading bloom filter information
  • Loading branch information
barrust authored Nov 15, 2018
2 parents d313ebc + 1bb758e commit cf806c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions probables/blooms/basebloom.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ def __load(self, blm_type, filename, hash_function=None):
self.__fpr = vals[1]
self.__number_hashes = vals[2]
self.__num_bits = vals[3]
self.__est_elements = mybytes[0]
self._els_added = mybytes[1]
if blm_type in ['regular', 'reg-ondisk']:
self.__bloom_length = int(math.ceil(self.__num_bits / 8.0))
else:
Expand All @@ -237,6 +239,8 @@ def _load_hex(self, hex_string, hash_function=None):
self.__fpr = vals[1]
self.__number_hashes = vals[2]
self.__num_bits = vals[3]
self.__est_elements = tmp_data[0]
self._els_added = tmp_data[1]
if self.__blm_type in ['regular', 'reg-ondisk']:
self.__bloom_length = int(math.ceil(self.__num_bits / 8.0))
else:
Expand Down

0 comments on commit cf806c2

Please sign in to comment.