]> mj.ucw.cz Git - libucw.git/commitdiff
lizzard -> lizard
authorRobert Spalek <robert@ucw.cz>
Mon, 14 Jun 2004 11:07:45 +0000 (11:07 +0000)
committerRobert Spalek <robert@ucw.cz>
Mon, 14 Jun 2004 11:07:45 +0000 (11:07 +0000)
(the files have been renamed directly in CVS a few minutes earlier)

lib/Makefile
lib/lizard-test.c
lib/lizard.c
lib/lizard.h

index f13c10ad75969ec858a39315352118ae4e749fba..04d6ccd949978edf83e8927f353c6ac48a2f011b 100644 (file)
@@ -10,7 +10,7 @@ LIBSH_MODS=alloc alloc_str ctmatch db fastbuf fb-file fb-mem lists \
        wordsplit str_ctype str_upper str_lower bucket conf object sorter \
        finger proctitle ipaccess profile bitsig randomkey \
        hashfunc base64 base224 fb-temp fb-mmap fb-printf urlkey \
-       partmap fb-limfd fb-buffer mainloop exitstatus runcmd carefulio lizzard
+       partmap fb-limfd fb-buffer mainloop exitstatus runcmd carefulio lizard
 
 ifdef CONFIG_OWN_REGEX
 include lib/regex/Makefile
@@ -34,9 +34,9 @@ obj/lib/str-test: obj/lib/str-test.o $(LIBSH)
 obj/lib/asort-test: obj/lib/asort-test.o $(LIBSH)
 obj/lib/redblack-test: obj/lib/redblack-test.o $(LIBSH)
 obj/lib/binheap-test: obj/lib/binheap-test.o $(LIBSH)
-obj/lib/lizzard-test: obj/lib/lizzard-test.o $(LIBSH)
+obj/lib/lizard-test: obj/lib/lizard-test.o $(LIBSH)
 
-obj/lib/lizzard.o: CFLAGS += -O6 -funroll-loops
+obj/lib/lizard.o: CFLAGS += -O6 -funroll-loops
 
 include lib/perl/Makefile
 include lib/shell/Makefile
index 49983b36948d509a2ee6a439d1643e1769807f1d..38a76c56647f4265ca358914a7dfa3668ccd4e1c 100644 (file)
@@ -1,7 +1,7 @@
 #include "lib/lib.h"
 #include "lib/conf.h"
 #include "lib/fastbuf.h"
-#include "lib/lizzard.h"
+#include "lib/lizard.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
@@ -9,7 +9,7 @@
 
 static char *options = CF_SHORT_OPTS "cdt";
 static char *help = "\
-Usage: lizzard-test <options> input-file [output-file]\n\
+Usage: lizard-test <options> input-file [output-file]\n\
 \n\
 Options:\n"
 CF_USAGE
@@ -55,8 +55,8 @@ main(int argc, char **argv)
   struct fastbuf *fi = bopen(argv[optind], O_RDONLY, 1<<16);
   if (action != 'd')
   {
-    lo = li * LIZZARD_MAX_MULTIPLY + LIZZARD_MAX_ADD;
-    li += LIZZARD_NEEDS_CHARS;
+    lo = li * LIZARD_MAX_MULTIPLY + LIZARD_MAX_ADD;
+    li += LIZARD_NEEDS_CHARS;
   }
   else
   {
@@ -73,9 +73,9 @@ main(int argc, char **argv)
     printf("->expected %d ", lo);
   fflush(stdout);
   if (action != 'd')
-    lo = lizzard_compress(mi, li, mo);
+    lo = lizard_compress(mi, li, mo);
   else
-    lo = lizzard_decompress(mi, mo);
+    lo = lizard_decompress(mi, mo);
   printf("-> %d ", lo);
   fflush(stdout);
 
@@ -92,7 +92,7 @@ main(int argc, char **argv)
     void *mv;
     uns lv;
     mv = xmalloc(li);
-    lv = lizzard_decompress(mo, mv);
+    lv = lizard_decompress(mo, mv);
     printf("-> %d ", lv);
     fflush(stdout);
     if (lv != li || memcmp(mi, mv, lv))
index 8d53234b3d5b3846b34e58c5760420f329ed7e3e..d7b1b022fb425c4d086150f8959d0d74fd353125 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *     LiZzaRd -- Fast compression method based on Lempel-Ziv 77
+ *     LiZaRd -- Fast compression method based on Lempel-Ziv 77
  *
  *     (c) 2004, Robert Spalek <robert@ucw.cz>
  *
@@ -8,7 +8,7 @@
  */
 
 #include "lib/lib.h"
-#include "lib/lizzard.h"
+#include "lib/lizard.h"
 
 #include <string.h>
 
@@ -149,9 +149,9 @@ flush_copy_command(uns bof, byte *out, byte *start, uns len)
 }
 
 int
-lizzard_compress(byte *in, uns in_len, byte *out)
-  /* Requires out being allocated for at least in_len * LIZZARD_MAX_MULTIPLY +
-   * LIZZARD_MAX_ADD.  There must be at least LIZZARD_NEEDS_CHARS characters
+lizard_compress(byte *in, uns in_len, byte *out)
+  /* Requires out being allocated for at least in_len * LIZARD_MAX_MULTIPLY +
+   * LIZARD_MAX_ADD.  There must be at least LIZARD_NEEDS_CHARS characters
    * allocated after in.  Returns the actual compressed length. */
 {
   hash_ptr_t hash_tab[HASH_SIZE];
@@ -280,7 +280,7 @@ read_unary_value(byte *in, uns *val)
 }
 
 int
-lizzard_decompress(byte *in, byte *out)
+lizard_decompress(byte *in, byte *out)
   /* Requires out being allocated for the decompressed length must be known
    * beforehand.  It is desirable to lock the following memory page for
    * read-only access to prevent buffer overflow.  Returns the actual
index 1929cffb0b0fe2b928f732b696586b68abf902c9..f46d08695770c48d84006014ff0998379738602c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *     LiZzaRd -- Fast compression method based on Lempel-Ziv 77
+ *     LiZaRd -- Fast compression method based on Lempel-Ziv 77
  *
  *     (c) 2004, Robert Spalek <robert@ucw.cz>
  *
@@ -7,11 +7,11 @@
  *     the compression method is based on zlib.
  */
 
-#define        LIZZARD_NEEDS_CHARS     8
+#define        LIZARD_NEEDS_CHARS      8
   /* The compression routine needs input buffer 8 characters longer, because it
    * does not check the input bounds all the time.  */
-#define        LIZZARD_MAX_MULTIPLY    23./22
-#define        LIZZARD_MAX_ADD         4
+#define        LIZARD_MAX_MULTIPLY     23./22
+#define        LIZARD_MAX_ADD          4
   /* In the worst case, the compressed file will not be longer than its
    * original length * 23/22 + 4.
    *
@@ -23,5 +23,5 @@
    * total length is 2(header) + 2(link) + 19(string) = 23.
    */
 
-int lizzard_compress(byte *in, uns in_len, byte *out);
-int lizzard_decompress(byte *in, byte *out);
+int lizard_compress(byte *in, uns in_len, byte *out);
+int lizard_decompress(byte *in, byte *out);