1 /* Copyright (C) 2001-2012 Artifex Software, Inc.
4 This software is provided AS-IS with no warranty, either express or
7 This software is distributed under license and may not be copied,
8 modified or distributed except as expressly authorized under the terms
9 of the license contained in the file LICENSE in this distribution.
11 Refer to licensing information at http://www.artifex.com or contact
12 Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, San Rafael,
13 CA 94903, U.S.A., +1(415)492-9861, for further information.
21 typedef struct _Jbig2ArithState Jbig2ArithState;
23 /* An arithmetic coding context is stored as a single byte, with the
24 index in the low order 7 bits (actually only 6 are used), and the
25 MPS in the top bit. */
26 typedef unsigned char Jbig2ArithCx;
28 /* allocate and initialize a new arithmetic coding state */
30 jbig2_arith_new (Jbig2Ctx *ctx, Jbig2WordStream *ws);
34 jbig2_arith_decode (Jbig2ArithState *as, Jbig2ArithCx *pcx);
36 /* return the state's offset (for sanity checks) */
38 jbig2_arith_get_offset(Jbig2ArithState *as);