From: Zoltan B. <zb...@du...> - 2006-03-16 22:41:31
|
Hi, finally here's the change you requested. I also attached the dynamic object numbering patch as as it may enable some future improvements and the compression was made on top of that. The compression is a global setting, basically it is used in rpdf_finalize() when the PDF pages are written out. I am sorry that it took so long, I was occupied elsewhere. Best regards, Zoltán Böszörményi Bob Doan írta: >Hi, > >Patch looks good except I would prefer compression be optional at run >time as well. If we had something like: > >rpdf_enable_compression(struct rpdf *pdf, gboolean setting) > >And have a flag in the rpdf struct. >We could then have an output parameter in rlib to set it on. > >Thanks! > >- Bob > >On Sun, 2006-01-22 at 15:26 +0100, Zoltan Boszormenyi wrote: > > >>Hi, >> >>Zoltan Boszormenyi írta: >> >> >> >>>Now it's getting embarrassing... Fix again. Use this patch instead of >>>the previous. >>> >>>Zoltan Boszormenyi írta: >>> >>> >>> >>>>Another fix. :-( This time incremental against the previous one. >>>>- Don't free something I didn't allocated. >>>>- Some white space fixes. >>>> >>>> >>> >>>Also check the return value of deflateEnd(), too. >>> >>>Best regards, >>>Zoltán Böszörményi >>> >>> >>here's a slightly cheaper version of the patch, as deflateInit() >>is done only in rpdf_new() and deflateEnd() is done in rpdf_free(). >>Instead, deflateReset() is used in rpdf_add_page_content_compressed(). >> >>$ time for i in `seq 1 1000` ; do ./test >test1.pdf ; done >> >>real 0m2.359s >>user 0m1.041s >>sys 0m1.311s >> >>Now the 1000 iterations took only 201 msecs more than without compression. >>Also, should any error happen during compression, the next content won't be >>compressed. It should only happen under OOM condition and I guess it's >>very unlikely. >> >>Best regards, >>Zoltán Böszörményi >> >> >> > > > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log files >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >http://sel.as-us.falkag.net/sel?cmd=k&kid3432&bid#0486&dat1642 >_______________________________________________ >Rlib-devel mailing list >Rli...@li... >https://lists.sourceforge.net/lists/listinfo/rlib-devel > > > |