1 /* Copyright (C) 2003 artofcode LLC. All rights reserved. 2 3 This software is provided AS-IS with no warranty, either express or 4 implied. 5 6 This software is distributed under license and may not be copied, 7 modified or distributed except as expressly authorized under the terms 8 of the license contained in the file LICENSE in this distribution. 9 10 For more information about licensing, please refer to 11 http://www.ghostscript.com/licensing/. For information on 12 commercial licensing, go to http://www.artifex.com/licensing/ or 13 contact Artifex Software, Inc., 101 Lucas Valley Road #110, 14 San Rafael, CA 94903, U.S.A., +1(415)492-9861. 15 */ 16 17 /* $Id: sjbig2.h,v 1.6 2005/06/09 07:15:07 giles Exp $ */ 18 /* Definitions for jbig2decode filter */ 19 /* Requires scommon.h; strimpl.h if any templates are referenced */ 20 21 #ifndef sjbig2_INCLUDED 22 # define sjbig2_INCLUDED 23 24 #include "stdint_.h" 25 #include "scommon.h" 26 #include <jbig2.h> 27 28 /* JBIG2Decode internal stream state */ 29 typedef struct stream_jbig2decode_state_s 30 { 31 stream_state_common; /* a define from scommon.h */ 32 Jbig2GlobalCtx *global_ctx; 33 Jbig2Ctx *decode_ctx; 34 Jbig2Image *image; 35 long offset; /* offset into the image bitmap of the next byte to be returned */ 36 int error; 37 } 38 stream_jbig2decode_state; 39 40 /* call in to process the JBIG2Globals parameter */ 41 public int 42 s_jbig2decode_make_global_ctx(byte *data, uint length, Jbig2GlobalCtx **global_ctx); 43 public int 44 s_jbig2decode_set_global_ctx(stream_state *ss, Jbig2GlobalCtx *global_ctx); 45 46 #define private_st_jbig2decode_state() \ 47 gs_private_st_simple(st_jbig2decode_state, stream_jbig2decode_state,\ 48 "jbig2decode filter state") 49 extern const stream_template s_jbig2decode_template; 50 51 #endif /* sjbig2_INCLUDED */ 52