mozilla / filter-cascade

A python filter cascade implementation
Mozilla Public License 2.0
6 stars 5 forks source link

Fix #16 and #17: Salts must be propagated, and reduce the min_filter_size #18

Closed jcjones closed 4 years ago

jcjones commented 4 years ago

This PR does a few things:

  1. Salt propagation wasn't working for creation using filter_with_characteristics, which impacted both natural construction and the from_buf methods, fixing #16.
  2. filter_with_characteristics is now marked deprecated
  3. Filters are optional for the FilterCascade init method
  4. Reduces the filter minimum size to 1,000 elements (down from 10,000) to reduce space, fixing #17.
  5. Version bumps to 0.4.0

I experimented with more regarding #17, and it's definitely the case that one can iterate on the parameters and find a minimum solution, which might be desirable for some users and might be worth designing an automation tool to find. However, the current implementation matches the CRLite whitepaper and is best for the general case, so I only adjusted the minimum elements set.

If I remove the minimum elements portion, filters tend to get a very large number of layers quite quickly, which decreases efficiency. However, one can adjust the parameter min_filter_length down to even as low as 1 to experiment.