ComponentOne PdfViewer for WPF and Silverlight
C1.WPF.PdfViewer.4.6.2 Assembly / CSJ2K.j2k.entropy.encoder Namespace / MQCoder Class / codeSymbol Method
The symbol to be encoded, must be 0 or 1.
the context with which to encode the symbol.

In This Topic
    codeSymbol Method
    In This Topic
    This function performs the arithmetic encoding of one symbol. The function receives a bit that is to be encoded and a context with which to encode it.

    Each context has a current MPS and an index describing what the current probability is for the LPS. Each bit is encoded and if the probability of the LPS exceeds .5, the MPS and LPS are switched.

    Syntax
    'Declaration
     
    
    Public Sub codeSymbol( _
       ByVal bit As Integer, _
       ByVal context As Integer _
    ) 
    public void codeSymbol( 
       int bit,
       int context
    )

    Parameters

    bit
    The symbol to be encoded, must be 0 or 1.
    context
    the context with which to encode the symbol.
    See Also