Baqend/Orestes-Bloomfilter

allow control over which byte[] to hash to avoid unnecessary allocation + copy operations

talwgx opened this issue · 0 comments

talwgx commented

It would be great if there was an overload for in: src/main/java/orestes/bloomfilter/BloomFilter.java : public boolean addRaw(byte[] element) where one could specify the start and len within the 'byte[] element', so that if a large buffer has already been allocated in memory, one can specify which portions within it are to be added to the filter. Currently a new byte[] of the correct length must be allocated and copied into each time, which forces unnecessary allocation + copy operations.

public boolean addRaw(byte[] element);