Hi Dan,

Dan Stromberg wrote:

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

The README says:

1.3. Documentation for liblzma

    The liblzma API headers include short docs about each function
    and data type as Doxygen tags. These docs should be quite OK as
    a quick reference.

    I have planned to write a bunch of very well documented example
    programs, which (due to comments) should work as a tutorial to
    various features of liblzma. No such example programs have been
    written yet.

    For now, if you have never used liblzma, libbzip2, or zlib, I
    recommend learning *basics* of zlib API. Once you know that, it
    should be easier to learn liblzma.

        http://zlib.net/manual.html
        http://zlib.net/zlib_how.html

That advice served me well when I was in a similar position.  You
might also find doc/examples/xz_pipe_comp.c and src/xz/coder.c itself
helpful.  The fundamental function is lzma_code(), which is documented
where it is defined in lzma/base.h.

[...]
> 3) Ideally use a minimum of C preprocessor symbols, as this'll be for a
> ctypes-based module for Python

The values of constants are part of the stable ABI and should not
change from version to version.

[...]
> I'm not just looking for pyliblzma - I want the xz format.

pyliblzma uses the xz format, no?

> I also want
> something I can make production-quality; pyliblzma seems forever beta.

Have you tried contacting Per?

Hope that helps, and good luck.
Jonathan

Reply via email to