Package 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

Constructors
Constructor
Description
`In(InputStream in)`

## Method Summary

Modifier and Type
Method
Description
`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 Details

### In

public In(InputStream in) throws IOException

Throws:
  `IOException`

## Method Details

### readBit

public boolean readBit(int probability) throws IOException
Read a bit.

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

### readGolomb

public int readGolomb(int divisor) throws IOException
Read a value that is stored as a Golomb code.

Parameters:
  `divisor` - the divisor
Returns:
  the value
Throws:
  `IOException`