]> rtime.felk.cvut.cz Git - hornmich/skoda-qr-demo.git/blob - QRScanner/mobile/jni/thirdparty/jbig2dec/jbig2_arith.h
Add MuPDF native source codes
[hornmich/skoda-qr-demo.git] / QRScanner / mobile / jni / thirdparty / jbig2dec / jbig2_arith.h
1 /* Copyright (C) 2001-2012 Artifex Software, Inc.
2    All Rights Reserved.
3
4    This software is provided AS-IS with no warranty, either express or
5    implied.
6
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.
10
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.
14 */
15
16 /*
17     jbig2dec
18 */
19
20
21 typedef struct _Jbig2ArithState Jbig2ArithState;
22
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;
27
28 /* allocate and initialize a new arithmetic coding state */
29 Jbig2ArithState *
30 jbig2_arith_new (Jbig2Ctx *ctx, Jbig2WordStream *ws);
31
32 /* decode a bit */
33 bool
34 jbig2_arith_decode (Jbig2ArithState *as, Jbig2ArithCx *pcx);
35
36 /* return the state's offset (for sanity checks) */
37 int
38 jbig2_arith_get_offset(Jbig2ArithState *as);