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(java.io.InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanreadBit(int probability)Read a bit.intreadGolomb(int divisor)Read a value that is stored as a Golomb code.
-
-
-
Method Detail
-
readBit
public boolean readBit(int probability) throws java.io.IOExceptionRead 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.IOExceptionRead a value that is stored as a Golomb code.- Parameters:
divisor- the divisor- Returns:
- the value
- Throws:
java.io.IOException
-
-