-/* Constant for the multiplicative hash function. */
-#define LZ_HASH_MULTIPLIER 0x1E35A7BD
-
-static inline u32
-loaded_u32_to_u24(u32 v)
-{
- if (CPU_IS_LITTLE_ENDIAN)
- return v & 0xFFFFFF;
- else
- return v >> 8;
-}
-
+/*
+ * The hash function: given a sequence prefix held in the low-order bits of a
+ * 32-bit value, multiply by a carefully-chosen large constant. Discard any
+ * bits of the product that don't fit in a 32-bit value, but take the
+ * next-highest @num_bits bits of the product as the hash value, as those have
+ * the most randomness.
+ */