The current library is not ideal for all end users. It assumes that you are building a filter and holding it in memory all in one go.
Instead, most end users would like two distinct operations. One is "construction". The current code does this fine. The construction should allow us to serialize to disk the result.
Then you want to be able to simply query the result. In practice, you cannot assume that the data is in memory as an array. A safer assumption is to rely on a ByteBuffer. In practice, this will often be totally independent from the construction part.
Ideally, this should be compatible with the C/C++ code (which involves accessing the data in little endian mode).
The current library is not ideal for all end users. It assumes that you are building a filter and holding it in memory all in one go.
Instead, most end users would like two distinct operations. One is "construction". The current code does this fine. The construction should allow us to serialize to disk the result.
Then you want to be able to simply query the result. In practice, you cannot assume that the data is in memory as an array. A safer assumption is to rely on a
ByteBuffer
. In practice, this will often be totally independent from the construction part.Ideally, this should be compatible with the C/C++ code (which involves accessing the data in little endian mode).
Reference: https://github.com/FastFilter/xor_singleheader