Sunday, April 24, 2011

LZ4 source code now Opened

 The "great" thing with all those statistics tools provided by Google is that you can know exactly when, where and why people got to consult your website. Call me "big brother"...
In this particular example, the most frequent Google request leading to this website has been "LZ4 source code" for quite a few weeks. So at least it shows a genuine interest for it.

Well, if you have been typing these few words lately, the wait is over : LZ4 is now an Open Source project, hosted on Google Code.

The version proposed is the "Ultra Fast" one, ready for multi-threading purposes. It has been ex-purged of all windows-specific calls, to increase the capability to build LZ4 for any other system, using a standard C compiler.
An example "main.c" code is also provided, featuring simple file i/o interface. Those willing to start from a ready-to-use Visual Studio project will find one in the "download" category.

Well, hope this helps. Now it's a matter of heating your compilers and test suites...

[Edit] License has been changed to permissive BSD-style

9 comments:

  1. If it's a quick as the benchmarks say, hats off to you for sharing. Where a fast compressor is especially useful though is in embedded projects - Microcontrollers, Mobile devices, streaming packeted formats, etc. Unfortunately, the GPL family of licenses put a hamper on use and growth in embedded and closed source projects. If GPL code touches a final binary, you're obligated to release full source. Now sure, that's a great humanitarian+good will thing, but in the commercial world GPL just isn't compatible with the licenses of closed systems - PlayStation 3, Nintendo 3DS, et all. Open sourcing is a great first step, and I don't know what your goals are for LZ4, but being fast in a closed "laboratory like" setting as the GPL imposes neglects real world uses.

    ReplyDelete
  2. Thanks for feedback Mike.
    I'm not yet really familiar with licenses, and so stay opened to suggestions.
    As far as i understand, the GPL license is a kind of "default" license which applies to whoever wants to use it without further comment.

    But it seems i still "own" the code, and therefore i can still license it differently to any organisation, including to companies willing to produce closed source software with it.
    Does that answer your comment ?

    ReplyDelete
  3. What Mike said. All GPL does is guarantees no one outside of the "all software should be free, and closed source is evil!" crowd will ever use your code. Or even be able to look at it.

    This chart, while being somewhat a joke, is actually pretty accurate IMO: http://cl.ly/5nAo ;)

    (my own suggestion: if you want people to use your code, use MIT,BSD,zlib,Apache etc.).

    ReplyDelete
  4. LGPL won't work in a lot of platforms/setups either. On some platforms it's better than GPL (i.e. platforms where you can put LGPL'ed code into a separate .dll/.so/.dylib). In a nutshell, LGPL requires "that the user would be able to replace that functionality with any other compatible implementation", which is like replacing a DLL with another one that exports the same functions.

    However, some platforms just don't have that, or there's no good way for the "user" to achieve this. For example, game developers are _very_ interested in fast decompression libraries, but guess what? None of the gaming consoles are "LGPL compatible" since the casual user can't just go and replace a DLL that's inside a game disk with his own DLL. So LGPL, at least in the gaming industry, is almost as useless as GPL.

    ReplyDelete
  5. @Nearaz : Thanks for detailed answer. Currently pondering the better choice...

    ReplyDelete
  6. Hi, the LZ4 page says "BSD license" but in the code it still says GPL. It would be nice if you change the code to say BSD.

    ReplyDelete
  7. Hi Charles
    Actually, if i'm not mistaken, the LZ4 code is BSD, it is mentionned in the source file header.
    Only the demo "main.c" is GPL.
    Is that a problem ?

    ReplyDelete
  8. Hi. Lots of thanks for opening up such an amazing library. Keep up the good work.

    I really hope one day you will change even the lz4c.c to BSD.

    ReplyDelete