Pacote
    Preparing search index...

    Function optimal

    • Calculates Ribbon filter fingerprint bits for a false positive rate.

      Fingerprint bits are rounded up, so the actual false positive rate is 2^-fingerprintBits, at most errorRate, and no lower than 2^-32.

      Parameters

      • errorRate: number

        Desired false positive probability, between 0 and 1.

      Returns { fingerprintBits: number }

      The fingerprint bits to use.

      import { optimal } from '@pacote/ribbon-filter'

      const options = optimal(0.01)