code: static long readBits(ReadStream reader, int count) {
  		long bits = 0L;
  		for (int i = (count - 1) >> 3; i >= 0; i --) {
  			bits <<= 8;
  			bits |= reader.readByte() & 0xff;
  		}
  		return bits;
  	}
docs: not does not mask off the returned long - that is responsibility of caller