Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nemequ/liblzf.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Lehmann <schmorpforge@schmorp.de>2007-11-13 13:56:56 +0300
committerMarc Lehmann <schmorpforge@schmorp.de>2007-11-13 13:56:56 +0300
commitfeb89943a14cee4dfdee1d7e6f38e0ac4fc4d384 (patch)
tree2e9a7d40373e99bad561b4fa16da5fac9e44b265
parent9c49393c6642ca2737807933c60ec55cf3966b69 (diff)
*** empty log message ***
-rw-r--r--Changes1
-rw-r--r--lzf_c.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/Changes b/Changes
index 7e6b7e6..429bb62 100644
--- a/Changes
+++ b/Changes
@@ -10,6 +10,7 @@
3-15% faster than fastlz while still maintaining a similar ratio.
(amd64 and core 2 duo, ymmv). thanks a lot for the competition :)
- undo inline assembly, it is no longer helpful.
+ - no changes to the decompressor.
2.1 Fri Nov 2 13:34:42 CET 2007
- switched to a 2-clause bsd license with GPL exception.
diff --git a/lzf_c.c b/lzf_c.c
index 98371c5..bf86f1d 100644
--- a/lzf_c.c
+++ b/lzf_c.c
@@ -256,7 +256,7 @@ lzf_compress (const void *const in_data, unsigned int in_len,
}
}
- if (op + lit + 2 >= out_end)
+ if (op + 2 >= out_end)
return 0;
while (ip < in_end)
@@ -265,7 +265,8 @@ lzf_compress (const void *const in_data, unsigned int in_len,
*op++ = *ip++;
}
- op [- lit - 1] = lit - 1;
+ op [- lit - 1] = lit - 1; /* end run */
+ op -= !lit; /* undo run if length is zero */
return op - (u8 *)out_data;
}