Hi Gerel.

   I finally got the RL filter working. It's not easy to deal with
   state. :-/

Thanks.

   On the filter itself, I concluded that the minimum cache needed for
   the encoder is of 5 bytes (for writting).

It is ok. 

   Here I send the patch for the filter, a test, the memcpy()
   replacements and some other minor fixes.

Some comments follow.

   [EMAIL PROTECTED] pdf_stm_f_rl
   [EMAIL PROTECTED] pdf_stm_f_rl
   +
   [EMAIL PROTECTED] Test pdf_stm_f_rl_001
   +Create a memory-based writing and reading stream and attach
   +a RunLength filter decoder and encoder to each one.
   [EMAIL PROTECTED] @strong
   [EMAIL PROTECTED] Success condition
   +The decoded data should be correct.
   [EMAIL PROTECTED] table
   [EMAIL PROTECTED] deffn

Please write the tests for the filters as use cases in
torture/unit/base/stm/pdf-stm-read.c (for decoders) and in
torture/unit/base/stm/pdf-stm-write.c (for encoders): we are
implementing unit tests for the public functions.

   +          if (encode_rl_char (st, out) < 0)
   +              return PDF_OK;

Please use curled braces in the 'then' body of an 'if' even if it is
composed only by just one statement.

Also, can you please split your patch? Filter implementation, unit
tests and memcpy.

You know, my brain is too limited to process such a big chunk of
information :PPPP



Reply via email to