'xzd' - single-file, "self-compiling" xzminidec

2014-04-24
2014-04-24
  • Geoff Nixon

    Geoff Nixon - 2014-04-24

    Hi! So... I'm a big fan of the userland decoder from xz-embedded. (I've been teaching myself C (finally) and as a beginning I find this code very easy to read... thank you for commenting it so well!)

    Anyway, I finally got around to wrapping things up the way I always it "should be" for xzminidec - just one C file (to take advantage of WPO without LTO, etc., ease of building, etc.); plus a shell script wrapper to eliminate the need to "build" anything at all.

    Here's the tarball, but if you're feeling adventuresome, you can grab it with with these two lines, which should give you a sense of how it works, too.

    echo ':; curl -Ls http://git.io/JpIF5w > $0 && . $0' >./x
    chmod +x ./x; curl -Ls http://git.io/g3kwKw | ./x | tar x

    Please, of course, feel free to integrate / use as you see fit, if you think it is useful!

     
  • Lasse Collin

    Lasse Collin - 2014-04-24

    Like I wrote in the other post, it's good to keep in mind that XZ Embedded isn't a full implementation of the .xz format. In addition to the limitations of the library part of XZ Embedded, the command line tool xzminidec doesn't support concatenated .xz streams. Such files aren't that rare, probably because the pxz tool creates such files. For example the Linux source packages from kernel.org have multiple streams.

    It's true that XZ Embedded (and also XZ for Java) is quite clean code compared to XZ Utils but that just means that XZ Utils should be cleaned up. :-)

     
  • Geoff Nixon

    Geoff Nixon - 2014-04-24

    concatenated .xz streams

    Ah.

    It's true that XZ Embedded (and also XZ for Java) is quite clean code compared to XZ Utils but that just means that XZ Utils should be cleaned up. :-)

    Yeah, I noticed that ;)

    So... as a pretty decent hacker and a novice coder, if I wanted to help with that, where would you suggest to begin? Build system? Old tuklib stuff? Somewhere else? Start over from the LZMA SDK? ;)

     
    Last edit: Geoff Nixon 2014-04-24
  • Lasse Collin

    Lasse Collin - 2014-04-24

    I'm not sure where you should start if you want to clean things up. It has to wait beyond 5.2.0 and I won't think too much about the future until 5.2.0 has been released. There's not so much to do, I just haven't gotten it done.

    If you are interested in helping, please visit #tukaani on Freenode (although it may need patience until both are online at the same time). Unfortunately the most obvious things to do aren't the most interesting ones. For example, the test suite is very incomplete, so writing new tests would be very useful, but I know it's not so fun work.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks