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.
  • Constructor Details

  • Method Details

    • writeBit

      public void writeBit(boolean value, int probability) throws IOException
      Write a bit.
      Parameters:
      value - the value
      probability - the probability that the value is true
      Throws:
      IOException
    • flush

      public void flush() throws IOException
      Flush the stream.
      Throws:
      IOException
    • writeGolomb

      public void writeGolomb(int divisor, int value) throws IOException
      Write the Golomb code of a value.
      Parameters:
      divisor - the divisor
      value - the value
      Throws:
      IOException