summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2006-07-07 15:34:11 +0000
committerroot <root>2006-07-07 15:34:11 +0000
commit62f3e819eab18f9d175408dd7421b137132a728d (patch)
tree3a2187bc315043f88434988dfcc01323c174e8c1
parent09b6f08036955fa022877c76c55be1f0c4ad6b48 (diff)
*** empty log message ***
-rw-r--r--Changes9
-rw-r--r--lzfP.h30
2 files changed, 30 insertions, 9 deletions
diff --git a/Changes b/Changes
index dda2cab..b69d2b0 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,12 @@
+
+1.6 Fri Jul 7 17:31:26 CEST 2006
+ - the lzf example utility will now uncompress if invoked
+ as "unlzf" (patch by Scott Feeney).
+ - add CHECK_INPUT option that adds more checks for input
+ data validity.
+ - help applications that do not pass in the correct length
+ (such as php) by returning either EINVAL or E2BIG.
+
1.51 Thu Apr 14 22:15:46 CEST 2005
- incorporated C♯ implementation of both the en- and decoder,
written by "Oren J. Maurice <oymaurice@hazorea.org.il>".
diff --git a/lzfP.h b/lzfP.h
index 48963b2..84c6028 100644
--- a/lzfP.h
+++ b/lzfP.h
@@ -46,19 +46,19 @@
#endif
/*
- * size of hashtable is (1 << HLOG) * sizeof (char *)
+ * Size of hashtable is (1 << HLOG) * sizeof (char *)
* decompression is independent of the hash table size
* the difference between 15 and 14 is very small
- * for small blocks (and 14 is usually a but faster).
+ * for small blocks (and 14 is usually a bit faster).
* For a low-memory/faster configuration, use HLOG == 13;
* For best compression, use 15 or 16 (or more).
*/
#ifndef HLOG
-# define HLOG 14
+# define HLOG 15
#endif
/*
- * sacrifice very little compression quality in favour of compression speed.
+ * Sacrifice very little compression quality in favour of compression speed.
* This gives almost the same compression as the default code, and is
* (very roughly) 15% faster. This is the preferable mode of operation.
*/
@@ -68,7 +68,7 @@
#endif
/*
- * sacrifice some more compression quality in favour of compression speed.
+ * Sacrifice some more compression quality in favour of compression speed.
* (roughly 1-2% worse compression for large blocks and
* 9-10% for small, redundant, blocks and >>20% better speed in both cases)
* In short: when in need for speed, enable this for binary data,
@@ -79,14 +79,14 @@
#endif
/*
- * unconditionally aligning does not cost very much, so do it if unsure
+ * Unconditionally aligning does not cost very much, so do it if unsure
*/
#ifndef STRICT_ALIGN
# define STRICT_ALIGN !(defined(__i386) || defined (__amd64))
#endif
/*
- * use string functions to copy memory.
+ * Use string functions to copy memory.
* this is usually a loss, even with glibc's optimized memcpy
*/
#ifndef USE_MEMCPY
@@ -94,7 +94,7 @@
#endif
/*
- * you may choose to pre-set the hash table (might be faster on some
+ * You may choose to pre-set the hash table (might be faster on some
* modern cpus and large (>>64k) blocks)
*/
#ifndef INIT_HTAB
@@ -102,7 +102,7 @@
#endif
/*
- * avoid assigning values to errno variable? for some embedding purposes
+ * Avoid assigning values to errno variable? for some embedding purposes
* (linux kernel for example), this is neccessary. NOTE: this breaks
* the documentation in lzf.h.
*/
@@ -119,6 +119,18 @@
# define LZF_STATE_ARG 0
#endif
+/*
+ * Wether to add extra checks for input validity in lzf_decompress
+ * and return EINVAL if the input stream has been corrupted. This
+ * only shields against overflowing the input buffer and will not
+ * detect most corrupted streams.
+ * This check is not normally noticable on modern hardware
+ * (<1% slowdown), but might slow down older cpus considerably.
+ */
+#ifndef CHECK_INPUT
+# define CHECK_INPUT 0
+#endif
+
/*****************************************************************************/
/* nothing should be changed below */