pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] Patch for the Flate filter


From: jemarch
Subject: Re: [pdf-devel] Patch for the Flate filter
Date: Fri, 03 Oct 2008 03:41:04 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

    > A limitation remains: when finish_p is PDF_TRUE the filter can assume
    > that there is room in the output buffer to hold its EOD
    > marker. Currently the minimum size is 1 since the EOD marker of the
    > ASCII Hex encoder is '>'.

   There is the missing logic. It is the filter which decides when to stop
   producing output, no one else.

Then there is no issue: the "finalisation" only makes sense for
filters needed some kind of "external stimulous" that triggers the EOD
marker or something like that.

So it should not be a problem in your case, if it is the filter who
decides when to stop providing data, just provide data until the zlib
library (or whatever) gives you an EOF. You can ignore the finish_p
parameter.

   I still suggests that we encapsulate the stream buffers.

Why? The management of the buffers _into_ the filter implementations
is not complex at all, and it allows you to copy data blocks in an
efficient way using memcpy.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]