Package org.h2.dev.util
Class BinaryArithmeticStream.Out
java.lang.Object
org.h2.dev.util.BinaryArithmeticStream
org.h2.dev.util.BinaryArithmeticStream.Out
- Enclosing class:
- BinaryArithmeticStream
A binary arithmetic output 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidflush()Flush the stream.voidwriteBit(boolean value, int probability) Write a bit.voidwriteGolomb(int divisor, int value) Write the Golomb code of a value.
-
Constructor Details
-
Out
-
-
Method Details
-
writeBit
Write a bit.- Parameters:
value- the valueprobability- the probability that the value is true- Throws:
IOException
-
flush
Flush the stream.- Throws:
IOException
-
writeGolomb
Write the Golomb code of a value.- Parameters:
divisor- the divisorvalue- the value- Throws:
IOException
-