private byte[] serializeBitmap(RoaringBitmap bitmap) {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            try (DataOutputStream dos = new DataOutputStream(bos)) {
                bitmap.serialize(dos);
            } catch (IOException e) {
                throw new RuntimeException("Failed to serialize roaring bitmap.");
            }
            return bos.toByteArray();
        }
Finds the number of bands that need to be used for a given similarity threshold.

@param nHashes
@param jaccardThreshold
@return
ache/src/main/java/achecrawler/minhash/LSH.java