[cl-pdf-devel] cl-pdf with salza

Dmitriy Ivanov divanov at aha.ru
Fri Apr 8 17:21:39 UTC 2005


Hello Marc,

| I did not get much feedback on the new release with salza for the
| compression.
| Any problems/comments on this before I make a wider announce ?

The salza compression seems to work on LWW4.4. With string-to-octets and
other contribs of my own, it even works for Unicode strings, i.e. lw:text-string
:-)

The only "serious" amendment I have had to add is computing the length of
pdf stream with list content:

(defmethod initialize-instance :after ((obj pdf-stream) &rest init-options
&key empty)
  (unless empty
    (add-dict-value obj "/Length" #'(lambda (&aux (content (content obj)))
                                      (if (consp content)
                                          (reduce #'+ content :key #'length)
                                          (length content))))))

IMHO, salza code looks rather huge for such utility. Too many packages and
files (cf. Franz's inflate.cl), about 100Kb of fasl, does not provide enough
macrology to be ported efficiently to various Lisp implementations. Is it
really fast?

BTW, octet-replace does just the same thing as fli:replace-foreign-array.
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru




More information about the cl-pdf-devel mailing list