jmhodges/opposite_of_a_bloom_filter — pull request #2 by nicktelford (2013-01-25 12:22:46+00:00)
Title: Only hash relevant subset of ByteBuffer

In the `ByteBuffer` implementation, only the bytes `remaining()` from the current `position()` are relevant data. The backing `array()` could well contain additional data that is not a part of the element (e.g. if the `ByteBuffer` has been sliced from a larger buffer).

Both the comparison of the existing element to the new element, and the copy of the element in to the filter operate only on the subset of the buffer between `position()` and `remaining()`; the hashing of the element should too.