Interface Coder

    • Method Detail

      • encode

        it.unimi.dsi.fastutil.booleans.BooleanIterator encode​(int symbol)
        Encodes a symbol.
        Parameters:
        symbol - a symbol.
        Returns:
        a boolean iterator returning the bits coding symbol.
      • encode

        int encode​(int symbol,
                   OutputBitStream obs)
            throws java.io.IOException
        Encodes a symbol.
        Parameters:
        symbol - a symbol.
        obs - the output bit stream where the encoded symbol will be written.
        Returns:
        the number of bits written.
        Throws:
        java.io.IOException
      • flush

        int flush​(OutputBitStream obs)
        Flushes the coder. Warning: this method will not flush obs.
        Parameters:
        obs - the output bit stream where the flushing bits will be written.
        Returns:
        the number of bits written to flush the coder.
      • flush

        it.unimi.dsi.fastutil.booleans.BooleanIterator flush()
        Flushes the coder.
        Returns:
        a boolean iterator returning the bits used to flush this coder.