diff options
Diffstat (limited to 'programs/fullbench.c')
-rwxr-xr-x | programs/fullbench.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/programs/fullbench.c b/programs/fullbench.c index fe13d0b..cc39b15 100755 --- a/programs/fullbench.c +++ b/programs/fullbench.c @@ -295,6 +295,11 @@ static int local_LZ4_compress_usingDict(const char* in, char* out, int inSize) return LZ4_compress_usingDict(&LZ4_dict, in, out, inSize); } +static int local_LZ4_compress_limitedOutput_usingDict(const char* in, char* out, int inSize) +{ + return LZ4_compress_limitedOutput_usingDict(&LZ4_dict, in, out, inSize, LZ4_compressBound(inSize)); +} + static void* stateLZ4HC; static int local_LZ4_compressHC_withStateHC(const char* in, char* out, int inSize) @@ -359,17 +364,17 @@ int fullSpeedBench(char** fileNamesTable, int nbFiles) { int fileIdx=0; char* orig_buff; -# define NB_COMPRESSION_ALGORITHMS 13 +# define NB_COMPRESSION_ALGORITHMS 14 # define MINCOMPRESSIONCHAR '0' # define MAXCOMPRESSIONCHAR (MINCOMPRESSIONCHAR + NB_COMPRESSION_ALGORITHMS) - double totalCTime[NB_COMPRESSION_ALGORITHMS] = {0}; - double totalCSize[NB_COMPRESSION_ALGORITHMS] = {0}; + double totalCTime[NB_COMPRESSION_ALGORITHMS+1] = {0}; + double totalCSize[NB_COMPRESSION_ALGORITHMS+1] = {0}; # define NB_DECOMPRESSION_ALGORITHMS 7 # define MINDECOMPRESSIONCHAR '0' # define MAXDECOMPRESSIONCHAR (MINDECOMPRESSIONCHAR + NB_DECOMPRESSION_ALGORITHMS) static char* decompressionNames[] = { "LZ4_decompress_fast", "LZ4_decompress_fast_withPrefix64k", "LZ4_decompress_fast_usingDict", "LZ4_decompress_safe", "LZ4_decompress_safe_withPrefix64k", "LZ4_decompress_safe_usingDict", "LZ4_decompress_safe_partial" }; - double totalDTime[NB_DECOMPRESSION_ALGORITHMS] = {0}; + double totalDTime[NB_DECOMPRESSION_ALGORITHMS+1] = {0}; U64 totals = 0; @@ -498,6 +503,7 @@ int fullSpeedBench(char** fileNamesTable, int nbFiles) case 11: compressionFunction = local_LZ4_compressHC_continue; initFunction = LZ4_createHC; compressorName = "LZ4_compressHC_continue"; break; case 12: compressionFunction = local_LZ4_compressHC_limitedOutput_continue; initFunction = LZ4_createHC; compressorName = "LZ4_compressHC_limitedOutput_continue"; break; case 13: compressionFunction = local_LZ4_compress_usingDict; initFunction = local_LZ4_resetDictT; compressorName = "LZ4_compress_usingDict"; break; + case 14: compressionFunction = local_LZ4_compress_limitedOutput_usingDict; initFunction = local_LZ4_resetDictT; compressorName = "LZ4_compress_limitedOutput_usingDict"; break; default : DISPLAY("ERROR ! Bad algorithm Id !! \n"); free(chunkP); return 1; } @@ -681,7 +687,7 @@ int main(int argc, char** argv) char* input_filename=0; // Welcome message - DISPLAY( WELCOME_MESSAGE); + DISPLAY(WELCOME_MESSAGE); if (argc<2) { badusage(exename); return 1; } |