(State s)
| 174 | } |
| 175 | |
| 176 | static int initBitReader(State s) { |
| 177 | s.byteBuffer = new byte[BUFFER_SIZE]; |
| 178 | if (BITNESS == 64) { |
| 179 | s.accumulator64 = 0; |
| 180 | s.intBuffer = new int[HALF_BUFFER_SIZE]; |
| 181 | } else { |
| 182 | s.accumulator32 = 0; |
| 183 | s.shortBuffer = new short[HALF_BUFFER_SIZE]; |
| 184 | } |
| 185 | s.bitOffset = BITNESS; |
| 186 | s.halfOffset = HALVES_CAPACITY; |
| 187 | s.endOfStreamReached = 0; |
| 188 | return prepare(s); |
| 189 | } |
| 190 | |
| 191 | private static int prepare(State s) { |
| 192 | if (s.halfOffset > BitReader.HALF_WATERLINE) { |