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

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

Enclosing class:
  BinaryArithmeticStream

    public static class BinaryArithmeticStream.Out

extends 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
`BinaryArithmeticStream.Out(java.io.OutputStream out)`

Method Summary
`void` `flush()` Flush the stream.
`void` `writeBit(boolean value, int probability)` Write a bit.
`void` `writeGolomb(int divisor, int value)` Write the Golomb code of a value.

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

Constructor Detail

### BinaryArithmeticStream.Out

    public BinaryArithmeticStream.Out(java.io.OutputStream out)

Method Detail

### writeBit

    public void writeBit(boolean value,
                         int probability)
                  throws java.io.IOException

  Write a bit.

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

### flush

    public void flush()
               throws java.io.IOException

  Flush the stream.

  Throws:
    `java.io.IOException`

### writeGolomb

    public void writeGolomb(int divisor,
                            int value)
                     throws java.io.IOException

  Write the Golomb code of a value.

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