Class BinaryArithmeticStream.Out

    • Constructor Detail

      • Out

        public 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