ZF-8396: RunLengthDecode Filter support for PDF documents



It would be nice if the RunLengthDecode filter was in Zend_Pdf. I signed and sent the CLA a week ago but haven't gotten a response yet. So, I don't think it is safe for me to post my patch. Please advise.


I got my CLA approved. Attached is my patch. It includes a unit test.

Sorry. I forgot a couple of lines in the Stream.php file. Attached is the new patch.


I've applied attached patch. Thanks for your job!

BTW Provided implementation produced 'Uninitialized string offset' at 'library/Zend/Pdf/Filter/RunLength.php:58' warning while running unit tests.

I also added some improvements: using strspn() and str_repeat() functions and non-repeatable character sequences recognition.