## org.h2.dev.util
Class BinaryArithmeticStream.In

    java.lang.Object
      org.h2.dev.util.BinaryArithmeticStream
          org.h2.dev.util.BinaryArithmeticStream.In

Enclosing class:
  BinaryArithmeticStream

    public static class BinaryArithmeticStream.In

extends BinaryArithmeticStream

A binary arithmetic input stream.

Nested Class Summary

Nested classes/interfaces inherited from class org.h2.dev.util.BinaryArithmeticStream
`BinaryArithmeticStream.Huffman, BinaryArithmeticStream.In, BinaryArithmeticStream.Out`

Field Summary

Fields inherited from class org.h2.dev.util.BinaryArithmeticStream
`high, low, MAX_PROBABILITY`

Constructor Summary
`BinaryArithmeticStream.In(java.io.InputStream in)`

Method Summary
`boolean` `readBit(int probability)` Read a bit.
`int` `readGolomb(int divisor)` Read a value that is stored as a Golomb code.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BinaryArithmeticStream.In

    public BinaryArithmeticStream.In(java.io.InputStream in)
                              throws java.io.IOException

Throws:
  `java.io.IOException`

Method Detail

### readBit

    public boolean readBit(int probability)
                    throws java.io.IOException

  Read a bit.

  Parameters:
    `probability` - the probability that the value is true
  Returns:
    the value
  Throws:
    `java.io.IOException`

### readGolomb

    public int readGolomb(int divisor)
                   throws java.io.IOException

  Read a value that is stored as a Golomb code.

  Parameters:
    `divisor` - the divisor
  Returns:
    the value
  Throws:
    `java.io.IOException`