--- liblzf/lzf.h 2004/01/29 18:57:50 1.6 +++ liblzf/lzf.h 2007/11/02 12:39:20 1.11 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2003 Marc Alexander Lehmann + * Copyright (c) 2000-2007 Marc Alexander Lehmann * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: @@ -11,9 +11,6 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO @@ -24,6 +21,16 @@ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Alternatively, the contents of this file may be used under the terms of + * the GNU General Public License version 2 (the "GPL"), in which case the + * provisions of the GPL are applicable instead of the above. If you wish to + * allow the use of your version of this file only under the terms of the + * GPL and not to allow others to use your version of this file under the + * BSD license, indicate your decision by deleting the provisions above and + * replace them with the notice and other provisions required by the GPL. If + * you do not delete the provisions above, a recipient may use your version + * of this file under either the BSD or the GPL. */ #ifndef LZF_H @@ -38,6 +45,8 @@ ** ***********************************************************************/ +#define LZF_VERSION 0x0105 /* 1.5 */ + /* * Compress in_len bytes stored at the memory block starting at * in_data and write the result to out_data, up to a maximum length @@ -46,18 +55,20 @@ * If the output buffer is not large enough or any error occurs * return 0, otherwise return the number of bytes used (which might * be considerably larger than in_len, so it makes sense to always - * use out_len == in_len). + * use out_len == in_len - 1), to ensure _some_ compression, and store + * the data uncompressed otherwise. * * lzf_compress might use different algorithms on different systems and - * thus might result in different compressed strings depending on the - * phase of the moon or similar factors. However, all these strings are - * architecture-independent and will result in the original data when - * decompressed using lzf_decompress. + * even diferent runs, thus might result in different compressed strings + * depending on the phase of the moon or similar factors. However, all + * these strings are architecture-independent and will result in the + * original data when decompressed using lzf_decompress. * * The buffers must not be overlapping. * * If the option LZF_STATE_ARG is enabled, an extra argument must be - * supplied which is not reflected in this header file. Refer to lzf_c.c. + * supplied which is not reflected in this header file. Refer to lzfP.h + * and lzf_c.c. * */ unsigned int