[cl-pdf-devel] switching to binary format

Marc Battyani marc.battyani at fractalconcept.com
Thu Mar 17 11:21:26 UTC 2005


"Dmitriy Ivanov" <divanov at aha.ru> wrote:
> | I'm considering to switch cl-pdf to a binary format to avoid all those
> | character encoding problems. Dmitri Ivanov has already started in that
> | direction but it's for LW only. Has anybody else done similar
> | modifications for other Lisp implementations ?
> |
> | The binary format can be a problem for all the text parts written by
> | #'format and #'write-string. Also I don't want to have a performance
> | hit by manually converting strings to byte arrays.
> |
> | Any opinions on this ?
>
> Good.
>
> Without Unicode support in CL-PDF, we have to convert to a code page
> external format anyhow. If you feel like using
fli:convert-to-dynamic-foreign-string
> in LW, that could be not optimal. According to my experience with YSQL,
its
> counterpart fli:convert-from-foreign-string is implemented rather
> inefficiently, and "manually converting byte arrays to strings" works
> faster.

All those format conversion are tedious. Let's go back to asm! ;-)

> BTW, I have just updated my contribution di-pdf.lisp at lisp.ystok.ru.

OK from a first look you are still using write-string and format on the
binary stream. I don't think this will work on other implementations.

Marc





More information about the cl-pdf-devel mailing list