diff options
author | Simon Bünzli <zeniko@gmail.com> | 2014-01-03 12:15:09 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2014-01-06 13:13:41 +0000 |
commit | 0bfa2ce884eed8bef83fb23cf2e25dae81a2207e (patch) | |
tree | db83c056876db965b5625bef16990b6c6740257e /include/mupdf/fitz/filter.h | |
parent | 833c6a84bd7edf531b6074e9e13dd5ae57f21f12 (diff) | |
download | mupdf-0bfa2ce884eed8bef83fb23cf2e25dae81a2207e.tar.xz |
reuse JBIG2Globals
Certain optimized documents use a rather large common symbol dictionary
for all JBIG2 images. Caching these JBIG2Globals speeds up loading and
rendering of such documents.
Diffstat (limited to 'include/mupdf/fitz/filter.h')
-rw-r--r-- | include/mupdf/fitz/filter.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/mupdf/fitz/filter.h b/include/mupdf/fitz/filter.h index 0a62fb2d..106a51ac 100644 --- a/include/mupdf/fitz/filter.h +++ b/include/mupdf/fitz/filter.h @@ -4,8 +4,11 @@ #include "mupdf/fitz/system.h" #include "mupdf/fitz/context.h" #include "mupdf/fitz/buffer.h" +#include "mupdf/fitz/store.h" #include "mupdf/fitz/stream.h" +typedef struct fz_jbig2_globals_s fz_jbig2_globals; + fz_stream *fz_open_copy(fz_stream *chain); fz_stream *fz_open_null(fz_stream *chain, int len, int offset); fz_stream *fz_open_concat(fz_context *ctx, int max, int pad); @@ -22,6 +25,9 @@ fz_stream *fz_open_faxd(fz_stream *chain, fz_stream *fz_open_flated(fz_stream *chain); fz_stream *fz_open_lzwd(fz_stream *chain, int early_change); fz_stream *fz_open_predict(fz_stream *chain, int predictor, int columns, int colors, int bpc); -fz_stream *fz_open_jbig2d(fz_stream *chain, fz_buffer *global); +fz_stream *fz_open_jbig2d(fz_stream *chain, fz_jbig2_globals *globals); + +fz_jbig2_globals *fz_load_jbig2_globals(fz_context *ctx, unsigned char *data, int size); +void fz_free_jbig2_globals_imp(fz_context *ctx, fz_storable *globals); #endif |