[]
        
(Showing Draft Content)

CSJ2K.j2k.entropy.encoder.MQCoder.terminate

terminate Method

terminate()

This function flushes the remaining encoded bits and makes sure that enough information is written to the bit stream to be able to finish decoding, and then it reinitializes the internal state of the MQ coder but without modifying the context states.

       <p>After calling this method the 'finishLengthCalculation()' method
       should be called, after compensating the returned length for the length
       of previous coded segments, so that the length calculation is
       finalized.</p><p>The type of termination used depends on the one specified at the
       constructor.</p>
Declaration
public virtual int terminate()
Returns
Type Description
int

The length of the arithmetic codeword after termination, in bytes.