ComponentOne PdfViewer for WPF and Silverlight
C1.WPF.PdfViewer.4.6.2 Assembly / CSJ2K.j2k.entropy.encoder Namespace / MQCoder Class / terminate Method

In This Topic
    terminate Method
    In This Topic
    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.

    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.

    The type of termination used depends on the one specified at the constructor.

    Syntax
    'Declaration
     
    
    Public Overridable Function terminate() As Integer
    public virtual int terminate()

    Return Value

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