+static UCHAR
+bit_is_set(const UCHAR * const data,
+ const UINT offset)
+{
+ const UCHAR byte = data[offset >> 3];
+ UINT bit;
+
+ if (little_endian)
+ bit = offset; /* offset */
+ else /* or */
+ bit = ~offset; /* 7 - offset */
+ bit &= 7; /* modulo 8 */
+ return byte & (UCHAR) (1 << bit);
+}
+
+/* Find lowest and highest used offset in a byte array. */
+/* Returns 0 if and only if all bits are unset. */