shithub: jbig2

ref: bf37c640d04807206926a1fe7b7c501db9225452
dir: /jbig2_arith.h/

View raw version
/*
    jbig2dec
    
    Copyright (c) 2001 artofcode LLC.
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    $Id: jbig2_arith.h,v 1.4 2002/02/16 07:25:36 raph Exp $
*/

typedef struct _Jbig2ArithState Jbig2ArithState;

/* An arithmetic coding context is stored as a single byte, with the
   index in the low order 7 bits (actually only 6 are used), and the
   MPS in the top bit. */
typedef unsigned char Jbig2ArithCx;

Jbig2ArithState *
jbig2_arith_new (Jbig2Ctx *ctx, Jbig2WordStream *ws);

bool
jbig2_arith_decode (Jbig2ArithState *as, Jbig2ArithCx *pcx);