Liking cljdoc? Tell your friends :D

blossom.core


deserialize-filterclj

(deserialize-filter bytes params)

Deserialize the salts and the bit array from the binary format produced by serialize-filter, and reconstruct the bloom filter via restore-filter.

Deserialize the salts and the bit array from the binary format produced by
`serialize-filter`, and reconstruct the bloom filter via `restore-filter`.
sourceraw docstring

IBloomFiltercljprotocol

addclj

(add this item)

hit?clj

(hit? this item)
source

make-filterclj

(make-filter
  {:keys [hash-algo size num-hashes thread-safe?]
   :or {hash-algo "SHA-256" size 1024 num-hashes 3 thread-safe? false}})

Makes a new bloom filter.

Makes a new bloom filter.
sourceraw docstring

restore-filterclj

(restore-filter
  salts
  array
  {:keys [hash-algo size num-hashes thread-safe?]
   :or {hash-algo "SHA-256" size 1024 num-hashes 3 thread-safe? false}})

Restores the bloom filter from the salts and the bit-array.

Restores the bloom filter from the salts and the bit-array.
sourceraw docstring

serialize-filterclj

(serialize-filter bloom-filter)

Serialize the salts and the bit-array into a self-describing binary format:

int saltCount repeat saltCount times: int saltLen bytes saltLen ; the salt int arrayLen repeat arrayLen times: long value ; one long of the bit array

Serialize the salts and the bit-array into a self-describing binary format:

int   saltCount
repeat saltCount times:
  int   saltLen
  bytes saltLen        ; the salt
int   arrayLen
repeat arrayLen times:
  long  value          ; one long of the bit array
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close