Lines Matching defs:bits
7 /* Write bits into a byte array. */
19 /* This function writes bits into bytes in increasing addresses, and within
22 The function can write up to 56 bits in one go with WriteBits
23 Example: let's assume that 3 bits (Rs below) have been written already:
29 Now, we could write 5 or less bits in MSB by just shifting by 3
32 For n bits, we take the last 5 bits, OR that with high bits in BYTE-0,
35 uint64_t bits,
39 (uint32_t)(bits >> 32), (uint32_t)(bits & 0xFFFFFFFF),
41 BROTLI_DCHECK((bits >> n_bits) == 0);
44 /* This branch of the code can write up to 56 bits at a time,
45 7 bits are lost by being perhaps already in *p and at least
47 bits are in *p and we write 57 bits, then the next write will
51 uint64_t v = (uint64_t)(*p); /* Zero-extend 8 to 64 bits. */
52 v |= bits << (*pos & 7);
53 BROTLI_UNALIGNED_STORE64LE(p, v); /* Set some bits. */
62 bits <<= bits_reserved_in_first_byte;
63 *array_pos++ |= (uint8_t)bits;
67 bits >>= 8;
68 *array_pos++ = (uint8_t)bits;