[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pdf-devel] Crypt module
From: |
jemarch |
Subject: |
Re: [pdf-devel] Crypt module |
Date: |
Sat, 27 Dec 2008 14:37:12 +0100 |
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) |
> In that case the number of bytes to write is a function of the number
> of processed bytes. The filter can count how many bytes it processed
> after the last reset, in a local way.
>
> Consider:
>
>
> -> filter1 -> aesv2 -> filter2 ->
>
>
> Both filter1 and filter2 may be implementing quite different filtering
> algorithms. How would aesv2 benefit with the knowledge of the number
> of bytes already written by filter2, for example?
Sorry, I think I don't explain enough well.
I mean that due to some filters, _we_ could require know the output
size. Consider we create a new memory writing stream. It is possible
stream doesn't fill the buffer. Then, how I know how many bytes it
wrote?
I hope it is clear now :-)
To know how many bytes a filter wrote in a memory backend you can use
the 'pdf_stm_tell' function, that will tell you the current read/write
position.