GoogleSecuritySafebrowsingV5RiceDeltaEncoded32Bit
import type { GoogleSecuritySafebrowsingV5RiceDeltaEncoded32Bit } from "https://googleapis.deno.dev/v1/safebrowsing:v5.ts";
The Rice-Golomb encoded data. Used for either hashes or removal indices. It
is guaranteed that every hash or index here has the same length, and this
length is exactly 32 bits. Generally speaking, if we sort all the entries
lexicographically, we will find that the higher order bits tend not to change
as frequently as lower order bits. This means that if we also take the
adjacent difference between entries, the higher order bits have a high
probability of being zero. This exploits this high probability of zero by
essentially choosing a certain number of bits; all bits more significant than
this are likely to be zero so we use unary encoding. See the rice_parameter
field. Historical note: the Rice-delta encoding was first used in V4 of this
API. In V5, two significant improvements were made: firstly, the Rice-delta
encoding is now available with hash prefixes longer than 4 bytes; secondly,
the encoded data are now treated as big-endian so as to avoid a costly
sorting step.
§Properties
The number of entries that are delta encoded in the encoded data. If only
a single integer was encoded, this will be zero and the single value will
be stored in first_value
.