Klozz / lz4

Automatically exported from code.google.com/p/lz4
0 stars 0 forks source link

fullbench.c typo runs 2 lz4hc tests as lz4 #128

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run fullbench
2. look at LZ4_compressHC_withStateHC and 
LZ4_compressHC_limitedOutput_withStateHC
3. notice they have speed and compression ratio of non-HC version

What is the expected output? What do you see instead?
expect all HC tests to compress slow and well

What version of the product are you using? On what operating system?
rev 116

Please provide any additional information below
Index: fullbench.c
===================================================================
--- fullbench.c (revision 1)
+++ fullbench.c (working copy)
@@ -242,12 +242,12 @@
 static void* stateLZ4HC;
 static inline int local_LZ4_compressHC_withStateHC(const char* in, char* out, int inSize)
 {
-    return LZ4_compress_withState(stateLZ4HC, in, out, inSize);
+    return LZ4_compressHC_withStateHC(stateLZ4HC, in, out, inSize);
 }

 static inline int local_LZ4_compressHC_limitedOutput_withStateHC(const char* in, char* out, int inSize)
 {
-    return LZ4_compress_limitedOutput_withState(stateLZ4HC, in, out, inSize, 
LZ4_compressBound(inSize));
+    return LZ4_compressHC_limitedOutput_withStateHC(stateLZ4HC, in, out, 
inSize, LZ4_compressBound(inSize));
 }

Original issue reported on code.google.com by ejkr...@gmail.com on 1 Apr 2014 at 5:05

GoogleCodeExporter commented 8 years ago
also -d# should be *de*compression function -- typo in usage_advanced().

Original comment by ejkr...@gmail.com on 1 Apr 2014 at 5:53

GoogleCodeExporter commented 8 years ago
Thanks, clear bug report and straightforward solution.
It'll be part of next release candidate.

Original comment by yann.col...@gmail.com on 6 Apr 2014 at 6:58

GoogleCodeExporter commented 8 years ago
I couldn't find the -d# option within usage_advanced(). Are you sure about this 
one ?

Original comment by yann.col...@gmail.com on 6 Apr 2014 at 7:56

GoogleCodeExporter commented 8 years ago
You can test a release candidate version, correcting your (1st) reported bug at 
:
https://github.com/Cyan4973/lz4/tree/beta

Original comment by yann.col...@gmail.com on 6 Apr 2014 at 8:27

GoogleCodeExporter commented 8 years ago
When I run my local "fullbench" this is what I get:

kruus@borg:~/ssddup-ubd/cache/dev/lz4-r116/programs$ ./fullbench -h
*** LZ4 speed analyzer r116 64-bits, by Yann Collet [mods Erik Kruus] (Apr  2 
2014) ***
Usage :
      ./fullbench [arg] file1 file2 ... fileX
Arguments :
 -c     : compression tests only
 -d     : decompression tests only
 -H/-h  : Help (this text + advanced options)

Advanced options :
 -c#    : test only compression function # [0-@]
                                              ^
                    (oh, I had more than 9 versions in my tests, ignore this)
 -d#    : test only decompression function # [0-5]    <---- *** add "de" ***
                    ^^
 -i#    : iteration loops [1-9](default : 6)
 -B#    : Block size [4-7](default : 7)
(... my version continues printing -c#/-d# names, not important)

The corrected typo in fullbench.c is:
DISPLAY( " -d#    : test only decompression function # [%c-%c]\n", 
MINDECOMPRESSIONCHAR, MAXDECOMPRESSIONCHAR);

Original comment by ejkr...@gmail.com on 7 Apr 2014 at 2:02

GoogleCodeExporter commented 8 years ago
Yes, you are totally correct.

The issue is fixed on the beta branch of github mirror now :
https://github.com/Cyan4973/lz4/tree/beta

Original comment by yann.col...@gmail.com on 8 Apr 2014 at 11:04

GoogleCodeExporter commented 8 years ago
Fixed into r117

Original comment by yann.col...@gmail.com on 22 Apr 2014 at 11:07