Lines Matching refs:bits
32 // The current position offset, in bits, from the msb in byte 0.
73 * @param bits additional bits to be accommodated
75 private void possExpand(int bits) {
76 if ((mPos + bits) < mEnd) return;
77 byte[] newBuf = new byte[(mPos + bits) >>> 2];
89 * @param bits the amount of data to write (gte 0, lte 8)
90 * @param data to write, will be masked to expose only bits param from lsb
92 public void write(int bits, int data) throws AccessException {
93 if ((bits < 0) || (bits > 8)) {
94 throw new AccessException("illegal write (" + bits + " bits)");
96 possExpand(bits);
97 data &= (-1 >>> (32 - bits));
99 int offset = 16 - (mPos & 0x07) - bits; // &7==%8
101 mPos += bits;
109 * @param bits the amount of data to write
112 public void writeByteArray(int bits, byte[] arr) throws AccessException {
114 int increment = Math.min(8, bits - (i << 3));
124 * @param bits the amount by which to increment the position
126 public void skip(int bits) {
127 possExpand(bits);
128 mPos += bits;