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 14:02:28 +0300
committerMarc Lehmann <schmorpforge@schmorp.de>2007-11-13 14:02:28 +0300
commite8292324f3881e15feb01a155f177d52a0c6ae96 (patch)
treef259427b99d8d02b56cab618cbf867946b8e3b3f
parentfeb89943a14cee4dfdee1d7e6f38e0ac4fc4d384 (diff)
*** empty log message ***
-rw-r--r--bench.c4
-rw-r--r--lzf_c.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/bench.c b/bench.c
index 4289b8e..2c26a8d 100644
--- a/bench.c
+++ b/bench.c
@@ -42,11 +42,11 @@ int main(void)
fclose (f);
for (lp = 0; lp < 1000; lp++) {
- s=stamp();
l = lzf_compress (data, DSIZE, data2, DSIZE*2);
+ s=stamp();
//l = fastlz_compress_level (1, data, DSIZE, data2);
- si[0]=measure(s);
j = lzf_decompress (data2, l, data3, DSIZE*2);
+ si[0]=measure(s);
printf ("\r%10d (%d) ", si[0], l);
if (si[0] < min && si[0] > 0)
diff --git a/lzf_c.c b/lzf_c.c
index bf86f1d..48bdd6a 100644
--- a/lzf_c.c
+++ b/lzf_c.c
@@ -159,12 +159,12 @@ lzf_compress (const void *const in_data, unsigned int in_len,
unsigned int maxlen = in_end - ip - len;
maxlen = maxlen > MAX_REF ? MAX_REF : maxlen;
- if (expect_false (op + 1 + 3 >= out_end))
- return 0;
-
op [- lit - 1] = lit - 1; /* stop run */
op -= !lit; /* undo run if length is zero */
+ if (expect_false (op + 3 + 1 >= out_end))
+ return 0;
+
for (;;)
{
if (expect_true (maxlen > 16))