Lines Matching refs:bitLength
37 int bitLength; // Always non-negative. field in BitBuffer
46 bitLength = 0; in BitBuffer()
55 if (index < 0 || index >= bitLength) in getBit()
64 if (bitLength % 8 != 0) in getBytes()
66 byte[] result = new byte[bitLength / 8]; in getBytes()
78 if (len > Integer.MAX_VALUE - bitLength) in appendBits()
81 if (bitLength + len + 1 > data.length << 5) in appendBits()
83 assert bitLength + len <= data.length << 5; in appendBits()
85 int remain = 32 - (bitLength & 0x1F); in appendBits()
88 data[bitLength >>> 5] |= val >>> (len - remain); in appendBits()
89 bitLength += remain; in appendBits()
90 assert (bitLength & 0x1F) == 0; in appendBits()
95 data[bitLength >>> 5] |= val << (remain - len); in appendBits()
96 bitLength += len; in appendBits()
112 if (len > Integer.MAX_VALUE - bitLength) in appendBits()
115 while (bitLength + len > data.length * 32) in appendBits()
118 int shift = bitLength % 32; in appendBits()
120 System.arraycopy(vals, 0, data, bitLength / 32, (len + 31) / 32); in appendBits()
121 bitLength += len; in appendBits()
125 data[bitLength >>> 5] |= word >>> shift; in appendBits()
126 bitLength += 32; in appendBits()
127 data[bitLength >>> 5] = word << (32 - shift); in appendBits()