I'm looking for some example code (C preferred, something else if need be)
that will:

1) Demonstrate using liblzma (or whatever library xz-utils produces), but
producing output in the xz format, not the lzma format.

2) Demonstrate using liblzma (or whatever) for memory-to-memory compression,
and memory-to-memory decompression (I'm only compressing smallish chunks,
and wish to do my own I/O so I can sidestep the buffer cache)

3) Ideally use a minimum of C preprocessor symbols, as this'll be for a
ctypes-based module for Python - not a C extension module as is usual in
CPython, but a ctypes-based module so it'll run on the CPython's and Pypy -
and Jython too if I'm lucky.  If I must write a stubbish wrapper to reduce
the preprocessor dependency so be it, but I'd prefer not to of course.

I already have something written that'll open a pipe to/from an xz binary,
and that works fine, but for one of the next steps in my backshift project I
want a C API-based module.  Backshift:
http://stromberg.dnsalias.org/~dstromberg/backshift/

I'm not just looking for pyliblzma - I want the xz format.  I also want
something I can make production-quality; pyliblzma seems forever beta.

BTW, does the underlying library API (need to) change much?  ctypes-based
modules tend to be pretty sensitive to API changes.

Thanks!

Reply via email to