[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pdf-devel] Patch for the Flate filter
From: |
gerel |
Subject: |
[pdf-devel] Patch for the Flate filter |
Date: |
Wed, 01 Oct 2008 10:18:51 -0700 (PDT) |
Hi everyone,
Here is a patch for the Flate filter implementation plus tests.
##
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: address@hidden
# target_branch: file:///home/gerel/PROJECTS/libgnupdf/trunk/
# testament_sha1: 1aa276b97f1e53feced4a3dd7ce1a7eb0a338389
# timestamp: 2008-10-01 14:08:25 -0300
# base_revision_id: address@hidden
#
# Begin patch
=== modified file 'ChangeLog'
--- ChangeLog 2008-09-28 23:21:24 +0000
+++ ChangeLog 2008-10-01 02:14:52 +0000
@@ -1,3 +1,23 @@
+2008-09-30 Gerardo E. Gidoni <address@hidden>
+
+ * doc/gnupdf-tsd.texi: added flate filter tests.
+
+ * torture/unit/base/stm/pdf-stm-read.c: same.
+
+ * torture/unit/base/stm/pdf-stm-write.c: same.
+
+ * src/Makefile.am: added flate filter source files.
+
+ * src/base/pdf-stm-f-flate.c: adapted for new stream API.
+
+ * src/base/pdf-stm-f-flate.h: same.
+
+ * src/base/pdf-stm-filter.c: added flate filter.
+
+ * src/base/pdf-stm-filter.h: same.
+
+ * utils/pdf-filter.c: same.
+
2008-09-28 Gerardo E. Gidoni <address@hidden>
* src/base/pdf-stm-f-rl.c: decoder EOD mark fix.
=== modified file 'doc/gnupdf-tsd.texi'
--- doc/gnupdf-tsd.texi 2008-09-28 14:00:42 +0000
+++ doc/gnupdf-tsd.texi 2008-10-01 02:14:52 +0000
@@ -277,6 +277,16 @@
@end table
@end deffn
address@hidden Test pdf_stm_read_009
+Create a memory-based reading stream and attach a flate filter
+decoder to it.
address@hidden @strong
address@hidden Success condition
+The decoded data should be correct.
address@hidden table
address@hidden deffn
+
+
@node pdf_stm_read_char
@subsubsection pdf_stm_read_char
@@ -405,6 +415,15 @@
@end deffn
address@hidden Test pdf_stm_write_007
+Create a memory-based writing stream and attach a flate filter
+encoder to it.
address@hidden @strong
address@hidden Success condition
+The encoded data should be correct.
address@hidden table
address@hidden deffn
+
@node Text Module
@subsection Text Module
=== modified file 'src/Makefile.am'
--- src/Makefile.am 2008-09-27 22:28:27 +0000
+++ src/Makefile.am 2008-09-30 14:21:16 +0000
@@ -44,7 +44,8 @@
base/pdf-stm-filter.h base/pdf-stm-filter.c \
base/pdf-stm-f-null.h base/pdf-stm-f-null.c \
base/pdf-stm-f-ahex.h base/pdf-stm-f-ahex.c \
- base/pdf-stm-f-rl.h base/pdf-stm-f-rl.c
+ base/pdf-stm-f-rl.h base/pdf-stm-f-rl.c \
+ base/pdf-stm-f-flate.h base/pdf-stm-f-flate.c
# if ZLIB
# STM_MODULE_SOURCES += base/pdf-stm-f-flate.c base/pdf-stm-f-flate.h
=== modified file 'src/base/pdf-stm-f-flate.c'
--- src/base/pdf-stm-f-flate.c 2008-03-05 12:32:04 +0000
+++ src/base/pdf-stm-f-flate.c 2008-10-01 17:08:10 +0000
@@ -1,4 +1,4 @@
-/* -*- mode: C -*- Time-stamp: "08/03/05 12:24:36 jemarch"
+/* -*- mode: C -*- Time-stamp: "2008-10-01 14:01:53 gerel"
*
* File: pdf-stm-f-flate.c
* Date: Tue Jul 10 23:44:00 2007
@@ -26,173 +26,278 @@
#include <stdio.h>
#include <string.h>
-#include <zlib.h>
#include <pdf-alloc.h>
-#include <pdf-base.h>
+#include <pdf-hash.h>
#include <pdf-stm-f-flate.h>
-static int pdf_stm_f_flate_encode (pdf_char_t *in, pdf_stm_pos_t in_size,
- pdf_char_t **out, pdf_stm_pos_t *out_size);
-static int pdf_stm_f_flate_decode (pdf_char_t *in, pdf_stm_pos_t in_size,
- pdf_char_t **out, pdf_stm_pos_t *out_size);
-
-int
-pdf_stm_f_flate_init (void **filter_data,
- void *conf_data)
-{
- pdf_stm_f_flate_data_t *data;
- pdf_stm_f_flate_conf_t conf;
-
- data = (pdf_stm_f_flate_data_t *) filter_data;
- conf = (pdf_stm_f_flate_conf_t) conf_data;
-
- /* Create the private data storage */
- *data =
- (pdf_stm_f_flate_data_t) pdf_alloc (sizeof(struct pdf_stm_f_flate_data_s));
- (*data)->mode = conf->mode;
-
- return PDF_OK;
-}
-
-int
-pdf_stm_f_flate_apply (void *filter_data,
- pdf_char_t *in, pdf_stm_pos_t in_size,
- pdf_char_t **out, pdf_stm_pos_t *out_size)
-{
- pdf_stm_f_flate_data_t data;
-
- data = (pdf_stm_f_flate_data_t) filter_data;
- switch (data->mode)
- {
- case PDF_STM_F_FLATE_MODE_ENCODE:
- {
- return pdf_stm_f_flate_encode (in, in_size, out, out_size);
- }
- case PDF_STM_F_FLATE_MODE_DECODE:
- {
- return pdf_stm_f_flate_decode (in, in_size, out, out_size);
- }
- default:
- {
+static int deflate_inbuf (pdf_stm_f_flate_t st, pdf_stm_buffer_t out,
+ int flush);
+
+pdf_status_t
+pdf_stm_f_flateenc_init (pdf_hash_t params, void **state)
+{
+ pdf_status_t ret;
+ pdf_stm_f_flate_t filter_state;
+
+ filter_state = pdf_alloc (sizeof (struct pdf_stm_f_flate_s));
+
+ if (state == NULL)
+ {
+ ret = PDF_EBADDATA;
+ }
+ else if (filter_state == NULL)
+ {
+ ret = PDF_ENOMEM;
+ }
+ else
+ {
+ /* Initialize fields */
+ filter_state->stream.zalloc = Z_NULL;
+ filter_state->stream.zfree = Z_NULL;
+ filter_state->stream.opaque = Z_NULL;
+ filter_state->zlib_init_p = PDF_FALSE;
+ filter_state->writing_p = PDF_FALSE;
+ filter_state->to_write = 0;
+ filter_state->incnt = 0;
+ filter_state->outcnt = 0;
+ filter_state->zret = Z_OK;
+
+ *state = (void *) filter_state;
+ ret = PDF_OK;
+ }
+
+ return ret;
+}
+
+
+pdf_status_t
+pdf_stm_f_flatedec_init (pdf_hash_t params, void **state)
+{
+ return pdf_stm_f_flateenc_init(params, state);
+}
+
+
+pdf_status_t
+pdf_stm_f_flateenc_apply (pdf_hash_t params, void *state, pdf_stm_buffer_t in,
+ pdf_stm_buffer_t out, pdf_bool_t finish_p)
+{
+ pdf_stm_f_flate_t st;
+
+ st = (pdf_stm_f_flate_t) state;
+
+ /* Initialize stream input/output parameters */
+ if (!st->zlib_init_p)
+ {
+ if (deflateInit (&(st->stream), Z_DEFAULT_COMPRESSION) != Z_OK)
+ {
+ return PDF_ERROR;
+ }
+ st->zlib_init_p = PDF_TRUE;
+ }
+
+ if (st->zret == Z_STREAM_END)
+ {
+ return PDF_EEOF;
+ }
+
+ /* Fill the input CHUNK */
+ while (st->incnt < PDF_STM_F_FLATE_CHUNK && !pdf_stm_buffer_eob_p(in))
+ {
+ st->inbuf[st->incnt] = in->data[in->rp];
+ st->incnt++;
+ in->rp++;
+ }
+
+ /* More data may come */
+ if (!finish_p)
+ {
+ /* if the input CHUNK has space, ask for it. */
+ if (st->incnt < PDF_STM_F_FLATE_CHUNK)
+ {
+ return PDF_EEOF;
+ }
+ /* Now we have the input CHUNK full, we deflate and write to out */
+ if (deflate_inbuf(st, out, Z_NO_FLUSH) < 0)
+ {
+ return PDF_ERROR;
+ }
+ /* the input CHUNK now is empty, if needed, ask for input */
+ st->incnt = 0;
+ if (pdf_stm_buffer_eob_p(in))
+ {
+ return PDF_EEOF;
+ }
+ return PDF_OK;
+ }
+ /* No more data will come, we deflate with Z_FINISH and write to out */
+ else
+ {
+ if (deflate_inbuf(st, out, Z_FINISH) < 0)
+ {
+ return PDF_ERROR;
+ }
+ }
+
+ deflateEnd (&(st->stream));
+ return PDF_EEOF;
+}
+
+
+pdf_status_t
+pdf_stm_f_flatedec_apply (pdf_hash_t params, void *state, pdf_stm_buffer_t in,
+ pdf_stm_buffer_t out, pdf_bool_t finish_p)
+{
+ pdf_stm_f_flate_t st;
+
+ st = (pdf_stm_f_flate_t) state;
+
+ /* Initialize stream input/output parameters */
+ if (!st->zlib_init_p)
+ {
+ if (inflateInit (&(st->stream)) != Z_OK)
+ {
+ st->zret = Z_OK;
+ return PDF_ERROR;
+ }
+ st->zlib_init_p = PDF_TRUE;
+ }
+
+
+ /* Fill the input CHUNK */
+ if (!st->writing_p)
+ {
+ while (st->incnt < PDF_STM_F_FLATE_CHUNK && !pdf_stm_buffer_eob_p(in))
+ {
+ st->inbuf[st->incnt] = in->data[in->rp];
+ st->incnt++;
+ in->rp++;
+ }
+ }
+ else
+ {
+ /*
+ * Not nice, but keeps the writing process code clear.
+ * Notice that the labeled code is inside a while loop,
+ * so I feel that avoiding this goto won't bring us better code.
+ */
+ goto writing;
+ }
+
+ if (st->incnt == 0 || st->zret == Z_STREAM_END)
+ {
+ return PDF_EEOF;
+ }
+
+ /* we inflate and write to out */
+ st->stream.avail_in = st->incnt;
+ st->stream.next_in = st->inbuf;
+ do {
+ st->stream.avail_out = PDF_STM_F_FLATE_CHUNK;
+ st->stream.next_out = st->outbuf;
+ st->outcnt = 0;
+
+ st->zret = inflate(&(st->stream), Z_NO_FLUSH);
+ if (st->zret == Z_STREAM_ERROR || st->zret == Z_NEED_DICT ||
+ st->zret == Z_DATA_ERROR || st->zret == Z_MEM_ERROR)
+ {
+ /* should not be reached */
+ inflateEnd(&(st->stream));
return PDF_ERROR;
}
+
+ st->to_write = PDF_STM_F_FLATE_CHUNK - st->stream.avail_out;
+
+ writing:
+ while (st->outcnt < st->to_write && !pdf_stm_buffer_full_p(out))
+ {
+ out->data[out->wp] = st->outbuf[st->outcnt];
+ out->wp++;
+ st->outcnt++;
+ }
+ if (pdf_stm_buffer_full_p(out))
+ {
+ st->writing_p = PDF_TRUE;
+ return PDF_OK;
+ }
+ } while (st->stream.avail_out == 0);
+
+ /* the input CHUNK now is empty, if needed, ask for input */
+ st->writing_p = PDF_FALSE;
+ st->incnt = 0;
+ if (pdf_stm_buffer_eob_p(in))
+ {
+ return PDF_EEOF;
}
-
- /* Not reached */
-}
-
-int
-pdf_stm_f_flate_dealloc (void **filter_data)
-{
- pdf_stm_f_flate_data_t *data;
-
- data = (pdf_stm_f_flate_data_t *) filter_data;
- pdf_dealloc (*data);
-
- return PDF_OK;
-}
+
+ return PDF_OK;
+}
+
+
+
+pdf_status_t
+pdf_stm_f_flatedec_dealloc_state (void *state)
+{
+ pdf_stm_f_flate_t st = state;
+ inflateEnd(&(st->stream));
+ pdf_dealloc (state);
+ return PDF_OK;
+}
+
+pdf_status_t
+pdf_stm_f_flateenc_dealloc_state (void *state)
+{
+ pdf_dealloc (state);
+ return PDF_OK;
+}
+
/* Private functions */
static int
-pdf_stm_f_flate_encode (pdf_char_t *in,
- pdf_stm_pos_t in_size,
- pdf_char_t **out,
- pdf_stm_pos_t *out_size)
-{
- unsigned long compressed_bound;
- int ret;
-
- /* Allocate memory for destination buffer */
- compressed_bound = compressBound (in_size);
- *out_size = compressed_bound;
- *out = (pdf_char_t *) pdf_alloc (*out_size);
-
- /* Compress input */
- ret = compress (*out,
- (unsigned long *) out_size,
- in,
- in_size);
-
- if (ret == Z_OK)
- {
- /* Adjust memory to really used and return */
- *out = (pdf_char_t *) pdf_realloc (*out,
- *out_size);
- return PDF_OK;
- }
- else
- {
- /* Z_MEM_ERROR or Z_BUF_ERROR happened. In any case, return
- reporting that the filter application failed. */
- return PDF_FALSE;
- }
-
- /* Not reached */
-}
-
-#define CHUNK 16384
-
-static int
-pdf_stm_f_flate_decode (pdf_char_t *in,
- pdf_stm_pos_t in_size,
- pdf_char_t **out,
- pdf_stm_pos_t *out_size)
-{
- z_stream zstm;
- int ret;
- pdf_char_t out_aux[16384];
- pdf_stm_pos_t nchunks;
-
- zstm.zalloc = Z_NULL;
- zstm.zfree = Z_NULL;
- zstm.opaque = Z_NULL;
- zstm.avail_in = in_size;
- zstm.next_in = in;
-
- inflateInit (&zstm);
-
- *out_size = 0;
- *out = NULL;
- nchunks = 0;
- do
- {
- zstm.avail_out = CHUNK;
- zstm.next_out = out_aux;
-
- ret = inflate (&zstm, Z_NO_FLUSH);
-
- switch (ret)
- {
- case Z_NEED_DICT:
- case Z_DATA_ERROR:
- case Z_MEM_ERROR:
- {
- goto error;
- }
- }
-
- *out_size = *out_size + (CHUNK - zstm.avail_out);
- *out = (pdf_char_t *) pdf_realloc (*out,
- *out_size);
-
- memcpy (*out + (nchunks * CHUNK),
- out_aux,
- CHUNK - zstm.avail_out);
-
- nchunks++;
-
- } while (ret != Z_STREAM_END);
-
- ret = inflateEnd (&zstm);
-
- return PDF_OK;
-
- error:
- (void) inflateEnd (&zstm);
- return PDF_ERROR;
-}
+deflate_inbuf (pdf_stm_f_flate_t st, pdf_stm_buffer_t out, int flush)
+{
+ st->stream.avail_in = st->incnt;
+ st->stream.next_in = st->inbuf;
+ do {
+ st->stream.avail_out = PDF_STM_F_FLATE_CHUNK;
+ st->stream.next_out = st->outbuf;
+ st->outcnt = 0;
+
+ /* Make sure the output limit is enough */
+ if(deflateBound(&st->stream,st->incnt) > (out->size - out->wp))
+ {
+ /* should not be reached */
+ deflateEnd (&(st->stream));
+ return -1;
+ }
+
+ st->zret = deflate(&(st->stream), flush);
+ if (st->zret == Z_STREAM_ERROR)
+ {
+ /* should not be reached */
+ deflateEnd (&(st->stream));
+ return -1;
+ }
+
+ st->to_write = PDF_STM_F_FLATE_CHUNK - st->stream.avail_out;
+ while (st->outcnt < st->to_write && !pdf_stm_buffer_full_p(out))
+ {
+ out->data[out->wp++] = st->outbuf[st->outcnt];
+ st->outcnt++;
+ }
+ if (pdf_stm_buffer_full_p(out))
+ {
+ /* should _not_ be reached */
+ deflateEnd (&(st->stream));
+ return -1;
+ }
+ } while (st->stream.avail_out == 0);
+
+ return 0;
+}
+
+
/* End of pdf_stm_f_flate.c */
=== modified file 'src/base/pdf-stm-f-flate.h'
--- src/base/pdf-stm-f-flate.h 2008-02-11 01:11:25 +0000
+++ src/base/pdf-stm-f-flate.h 2008-10-01 17:08:10 +0000
@@ -1,4 +1,4 @@
-/* -*- mode: C -*- Time-stamp: "08/02/11 01:04:11 jemarch"
+/* -*- mode: C -*- Time-stamp: "2008-10-01 14:07:32 gerel"
*
* File: pdf-stm-f-flate.h
* Date: Tue Jul 10 23:39:27 2007
@@ -27,43 +27,53 @@
#define PDF_STM_F_FLATE_H
#include <config.h>
-#include <pdf-base.h>
-
-/* Filter configuration */
-
-/* BEGIN PUBLIC */
-
-enum pdf_stm_f_flate_mode_t
-{
- PDF_STM_F_FLATE_MODE_ENCODE,
- PDF_STM_F_FLATE_MODE_DECODE
-};
-
-/* END PUBLIC */
-
-struct pdf_stm_f_flate_conf_s
-{
- int mode;
-};
-
-typedef struct pdf_stm_f_flate_conf_s *pdf_stm_f_flate_conf_t;
-
-/* Private data */
-
-struct pdf_stm_f_flate_data_s
-{
- int mode;
-};
-
-typedef struct pdf_stm_f_flate_data_s *pdf_stm_f_flate_data_t;
+#include <pdf-hash.h>
+#include <pdf-stm-buffer.h>
+#include <zlib.h>
+
+
+
+ /*
+ * As read in the zlib documentation, our cache size must be at least 0.1%
+ * larger than the CHUNK size, plus 12 bytes.
+ * We assume that our cache size is of 4096 bytes.
+ */
+#define PDF_STM_F_FLATE_CHUNK 1024
+
+struct pdf_stm_f_flate_s
+{
+ z_stream stream;
+ int zret;
+ pdf_size_t incnt, outcnt, to_write;
+ pdf_bool_t zlib_init_p, writing_p;
+ pdf_char_t inbuf[PDF_STM_F_FLATE_CHUNK], outbuf[PDF_STM_F_FLATE_CHUNK];
+};
+
+typedef struct pdf_stm_f_flate_s * pdf_stm_f_flate_t;
+
/* Filter API implementation */
-int pdf_stm_f_flate_init (void **filter_data, void *conf_data);
-int pdf_stm_f_flate_apply (void *filter_data,
- pdf_char_t *in, pdf_stm_pos_t in_size,
- pdf_char_t **out, pdf_stm_pos_t *out_size);
-int pdf_stm_f_flate_dealloc (void **filter_data);
+pdf_status_t pdf_stm_f_flatedec_init (pdf_hash_t params,
+ void **state);
+
+pdf_status_t pdf_stm_f_flatedec_apply (pdf_hash_t params,
+ void *state,
+ pdf_stm_buffer_t in,
+ pdf_stm_buffer_t out,
+ pdf_bool_t finish_p);
+
+pdf_status_t pdf_stm_f_flateenc_init (pdf_hash_t params,
+ void **state);
+
+pdf_status_t pdf_stm_f_flateenc_apply (pdf_hash_t params,
+ void *state,
+ pdf_stm_buffer_t in,
+ pdf_stm_buffer_t out,
+ pdf_bool_t finish_p);
+
+pdf_status_t pdf_stm_f_flatedec_dealloc_state (void *state);
+pdf_status_t pdf_stm_f_flateenc_dealloc_state (void *state);
#endif /* pdf_stm_f_flate.h */
=== modified file 'src/base/pdf-stm-filter.c'
--- src/base/pdf-stm-filter.c 2008-09-28 13:51:52 +0000
+++ src/base/pdf-stm-filter.c 2008-09-30 17:51:31 +0000
@@ -1,4 +1,4 @@
-/* -*- mode: C -*- Time-stamp: "08/09/28 15:44:46 jemarch"
+/* -*- mode: C -*- Time-stamp: "2008-09-30 13:15:19 gerel"
*
* File: pdf-stm-filter.c
* Date: Thu Jun 12 22:13:31 2008
@@ -97,6 +97,20 @@
new->impl.dealloc_state_fn = pdf_stm_f_rldec_dealloc_state;
break;
}
+ case PDF_STM_FILTER_FLATE_ENC:
+ {
+ new->impl.init_fn = pdf_stm_f_flateenc_init;
+ new->impl.apply_fn = pdf_stm_f_flateenc_apply;
+ new->impl.dealloc_state_fn = pdf_stm_f_flateenc_dealloc_state;
+ break;
+ }
+ case PDF_STM_FILTER_FLATE_DEC:
+ {
+ new->impl.init_fn = pdf_stm_f_flatedec_init;
+ new->impl.apply_fn = pdf_stm_f_flatedec_apply;
+ new->impl.dealloc_state_fn = pdf_stm_f_flatedec_dealloc_state;
+ break;
+ }
default:
{
/* Shall not be reached, but makes the compiler happy */
=== modified file 'src/base/pdf-stm-filter.h'
--- src/base/pdf-stm-filter.h 2008-09-28 13:51:52 +0000
+++ src/base/pdf-stm-filter.h 2008-09-30 14:21:16 +0000
@@ -1,4 +1,4 @@
-/* -*- mode: C -*- Time-stamp: "08/09/28 15:40:32 jemarch"
+/* -*- mode: C -*- Time-stamp: "2008-09-30 11:20:36 gerel"
*
* File: pdf-stm-filter.h
* Date: Thu Jun 12 22:05:06 2008
@@ -35,6 +35,7 @@
#include <pdf-stm-f-null.h>
#include <pdf-stm-f-ahex.h>
#include <pdf-stm-f-rl.h>
+#include <pdf-stm-f-flate.h>
/* BEGIN PUBLIC */
@@ -45,7 +46,10 @@
PDF_STM_FILTER_AHEX_ENC,
PDF_STM_FILTER_AHEX_DEC,
PDF_STM_FILTER_RL_ENC,
- PDF_STM_FILTER_RL_DEC
+ PDF_STM_FILTER_RL_DEC,
+ PDF_STM_FILTER_FLATE_DEC,
+ PDF_STM_FILTER_FLATE_ENC
+
};
/* Filter implementation */
=== modified file 'torture/unit/base/stm/pdf-stm-read.c'
--- torture/unit/base/stm/pdf-stm-read.c 2008-09-28 23:21:24 +0000
+++ torture/unit/base/stm/pdf-stm-read.c 2008-10-01 16:29:41 +0000
@@ -1,4 +1,4 @@
-/* -*- mode: C -*- Time-stamp: "2008-09-28 20:17:40 gerel"
+/* -*- mode: C -*- Time-stamp: "2008-10-01 13:28:35 gerel"
*
* File: pdf-stm-read.c
* Date: Sat Sep 20 15:20:17 2008
@@ -289,6 +289,9 @@
}
END_TEST
+
+
+
/*
* Test: pdf_stm_read_005
* Description:
@@ -538,6 +541,84 @@
/*
+ * Test: pdf_stm_read_009
+ * Description:
+ * Create a memory-based reading stream and attach a flate filter
+ * decoder to it.
+ * Success condition:
+ * The decoded data should be correct.
+ */
+START_TEST (pdf_stm_read_009)
+{
+ pdf_status_t ret;
+ pdf_hash_t params;
+ pdf_stm_t stm;
+ pdf_size_t buf_size, total=1059,read;
+ pdf_char_t *buf, *decoded=
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990";
+ pdf_char_t *dataux, *encoded =
+ "\x78\x9c\x33\x34\x32\x32\x36\x36\x36\x01\x02\x53\x10\x30\x03\x03"
+ "\x73\x08\xb0\x80\x02\x4b\x18\x30\x30\x1c\x55\x3d\xaa\x7a\x54\xf5"
+ "\x88\x52\xcd\x00\x00\xe1\x0b\xdf\xfc";
+
+ /* Writing stream */
+ /* Create a memory buffer */
+ buf_size = 2000;
+ buf = pdf_alloc (buf_size);
+ fail_if(buf == NULL);
+ /* Create the stream */
+ ret = pdf_stm_mem_new (encoded,
+ 41,
+ 1040,
+ PDF_STM_READ,
+ &stm);
+ fail_if(ret != PDF_OK);
+ /* Create the filter */
+ fail_if (pdf_stm_install_filter (stm, PDF_STM_FILTER_FLATE_DEC, params) !=
+ PDF_OK);
+
+ read = 0;
+ total = 1059;
+ dataux = buf;
+ while (total > 0)
+ {
+ read = pdf_stm_read (stm, dataux, total);
+ dataux = dataux + read;
+ total -= read;
+ }
+
+ fail_if (memcmp (buf, decoded, 1059) != 0);
+ /* Destroy the stream */
+ pdf_stm_destroy (stm);
+ pdf_dealloc (buf);
+
+}
+END_TEST
+
+
+/*
* Test case creation function
*/
TCase *
@@ -553,6 +634,8 @@
tcase_add_test(tc, pdf_stm_read_006);
tcase_add_test(tc, pdf_stm_read_007);
tcase_add_test(tc, pdf_stm_read_008);
+ tcase_add_test(tc, pdf_stm_read_009);
+
return tc;
}
=== modified file 'torture/unit/base/stm/pdf-stm-write.c'
--- torture/unit/base/stm/pdf-stm-write.c 2008-09-28 13:32:56 +0000
+++ torture/unit/base/stm/pdf-stm-write.c 2008-10-01 16:29:41 +0000
@@ -1,4 +1,4 @@
-/* -*- mode: C -*- Time-stamp: "08/09/28 15:32:34 jemarch"
+/* -*- mode: C -*- Time-stamp: "2008-10-01 13:29:09 gerel"
*
* File: pdf-stm-write.c
* Date: Sun Sep 21 16:37:27 2008
@@ -348,6 +348,88 @@
}
END_TEST
+
+/*
+ * Test: pdf_stm_write_007
+ * Description:
+ * Create a memory-based writing stream and attach a flate filter
+ * encoder to it.
+ * Success condition:
+ * The encoded data should be correct.
+ */
+START_TEST (pdf_stm_write_007)
+{
+ pdf_status_t ret;
+ pdf_hash_t params;
+ pdf_stm_t stm;
+ pdf_size_t buf_size, total=1059,written;
+ pdf_char_t *buf, *decoded=
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990" \
+ "1223334444555556666667777777888888889999999990";
+ pdf_char_t *dataux, *encoded =
+ "\x78\x9c\x33\x34\x32\x32\x36\x36\x36\x01\x02\x53\x10\x30\x03\x03"
+ "\x73\x08\xb0\x80\x02\x4b\x18\x30\x30\x1c\x55\x3d\xaa\x7a\x54\xf5"
+ "\x88\x52\xcd\x00\x00\xe1\x0b\xdf\xfc";
+
+ /* Writing stream */
+ /* Create a memory buffer */
+ buf_size = 100;
+ buf = pdf_alloc (buf_size);
+ fail_if(buf == NULL);
+ /* Create the stream */
+ ret = pdf_stm_mem_new (buf,
+ buf_size,
+ 0,
+ PDF_STM_WRITE,
+ &stm);
+ fail_if(ret != PDF_OK);
+ /* Create the filter */
+ fail_if (pdf_stm_install_filter (stm, PDF_STM_FILTER_FLATE_ENC, params) !=
+ PDF_OK);
+
+ written = 0;
+ dataux = decoded;
+ while (total > 0)
+ {
+ written = pdf_stm_write (stm, dataux, total);
+ dataux = dataux + written;
+ total -= written;
+ }
+ pdf_stm_flush(stm);
+ pdf_stm_finish(stm);
+
+ fail_if (memcmp (buf, encoded, 41) != 0);
+ /* Destroy the stream */
+ pdf_stm_destroy (stm);
+ pdf_dealloc (buf);
+
+
+}
+END_TEST
+
+
+
/*
* Test case creation function
*/
@@ -362,6 +444,7 @@
tcase_add_test(tc, pdf_stm_write_004);
tcase_add_test(tc, pdf_stm_write_005);
tcase_add_test(tc, pdf_stm_write_006);
+ tcase_add_test(tc, pdf_stm_write_007);
return tc;
}
=== modified file 'utils/pdf-filter.c'
--- utils/pdf-filter.c 2008-09-28 10:56:49 +0000
+++ utils/pdf-filter.c 2008-10-01 02:14:52 +0000
@@ -1,4 +1,4 @@
-/* -*- mode: C -*- Time-stamp: "08/09/28 12:54:36 jemarch"
+/* -*- mode: C -*- Time-stamp: "2008-09-30 23:11:26 gerel"
*
* File: pdf-filter.c
* Date: Tue Jul 10 18:42:07 2007
@@ -164,6 +164,8 @@
pdf_hash_t ahexdec_filter_params;
pdf_hash_t rlenc_filter_params;
pdf_hash_t rldec_filter_params;
+ pdf_hash_t flateenc_filter_params;
+ pdf_hash_t flatedec_filter_params;
pdf_char_t *line;
pdf_size_t line_bytes;
pdf_size_t read_bytes;
@@ -288,14 +290,30 @@
#ifdef HAVE_LIBZ
case FLATEDEC_FILTER_ARG:
{
- /* pdf_stm_install_flatedec_filter (input,
- PDF_STM_FILTER_READ); */
+ ret = pdf_hash_new (NULL, &flatedec_filter_params);
+ if (ret != PDF_OK)
+ {
+ pdf_error (ret, stderr, "while creating the rldec filter
parameters hash table");
+ exit (1);
+ }
+
+ pdf_stm_install_filter (stm,
+ PDF_STM_FILTER_FLATE_DEC,
+ flatedec_filter_params);
break;
}
case FLATEENC_FILTER_ARG:
{
- /* pdf_stm_install_flateenc_filter (input,
- PDF_STM_FILTER_READ); */
+ ret = pdf_hash_new (NULL, &flateenc_filter_params);
+ if (ret != PDF_OK)
+ {
+ pdf_error (ret, stderr, "while creating the rldec filter
parameters hash table");
+ exit (1);
+ }
+
+ pdf_stm_install_filter (stm,
+ PDF_STM_FILTER_FLATE_ENC,
+ flateenc_filter_params);
break;
}
#endif /* HAVE_LIBZ */
# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWRGXjOgAMWp/gH/0IwD7////
/+/fnr////5gNT5wO8+NnrTx73LW2bgPS957a6+7PE8Xve++4Osz7JxHNPW9eNBTy1Iuxrt1yCt3
HUrud0lUVSZZVBUtsVZtE9233nvvC+s2RKkJrT1oTu5JoVu6uGlbDjsqiiGm6bMDVAqqISSVKxBo
Ej2yu1tm1VFsNNw1NAU0ym1A0ep6Rpo0GnspANAZGhoZAAGmgDQwlBBoTQETUwhTSfpR+qPU09T0
jNEAAAAAAAA0xCChDRpPUp6NQaaDNTaQ0GQAAAANGgAAk0ohCNE1PEj1Cep7Unpmomn6hADTQ0GQ
YIDIADQIkkINExDQAJkZGQAE0DVPKDCaeoNNBppoZMBUkQCaBNAgBE8TU00BqTynpGyZEZNAwgA0
yNqa1F7EB0FCSKD40BqlPIgMVQ7UBiHcgMBQ8rFgqQEC8R9HjAQHv/c/8a9h2R5PZBMekhpZ+i3J
IR4e045D26AmQiAUh6X3v/pk1SArmPHoufAdKrXjMkvHyAPEgxBg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