summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-07-10 12:58:57 +0200
committerTor Andersson <tor.andersson@artifex.com>2018-08-10 12:09:33 +0200
commit09f2e173850e011e6390c49a4f761e87dd87ffba (patch)
tree6026165eb2c859792e1c9c3578d470a4e6837f72 /include
parent62876a7025e31897e7ccb92ff8d461d3fef6ddb4 (diff)
downloadmupdf-09f2e173850e011e6390c49a4f761e87dd87ffba.tar.xz
Clean up null/range/endstream filter.
Use separate functions to keep the code simpler. Use memmem to simplify and optimize search for 'endstream' token. Do not look for 'endobj' since that could cause a false positives in compressed object streams that have duff lengths.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/fitz/filter.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/mupdf/fitz/filter.h b/include/mupdf/fitz/filter.h
index bdce36e8..5dd136a1 100644
--- a/include/mupdf/fitz/filter.h
+++ b/include/mupdf/fitz/filter.h
@@ -12,12 +12,12 @@ typedef struct fz_jbig2_globals_s fz_jbig2_globals;
typedef struct
{
int64_t offset;
- int len;
+ size_t length;
} fz_range;
-fz_stream *fz_open_null_n(fz_context *ctx, fz_stream *chain, fz_range *ranges, int nranges);
-fz_stream *fz_open_null(fz_context *ctx, fz_stream *chain, int len, int64_t offset);
-fz_stream *fz_open_pdf_stream(fz_context *ctx, fz_stream *chain, int len, int64_t offset);
+fz_stream *fz_open_null_filter(fz_context *ctx, fz_stream *chain, int len, int64_t offset);
+fz_stream *fz_open_range_filter(fz_context *ctx, fz_stream *chain, fz_range *ranges, int nranges);
+fz_stream *fz_open_endstream_filter(fz_context *ctx, fz_stream *chain, int len, int64_t offset);
fz_stream *fz_open_concat(fz_context *ctx, int max, int pad);
void fz_concat_push_drop(fz_context *ctx, fz_stream *concat, fz_stream *chain); /* Ownership of chain is passed in */
fz_stream *fz_open_arc4(fz_context *ctx, fz_stream *chain, unsigned char *key, unsigned keylen);