diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2014-05-20 22:26:03 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2014-05-20 22:26:03 (GMT) |
commit | 8c38ddd7e67354aa3205ac8c03e5b8f78f567a48 (patch) | |
tree | e6599dd4fb5ca44d2c852154f489725f209f7af9 /programs | |
parent | 9ac680972a3c124e2e512f7202889c4d397c6f9b (diff) | |
download | lz4-8c38ddd7e67354aa3205ac8c03e5b8f78f567a48.zip lz4-8c38ddd7e67354aa3205ac8c03e5b8f78f567a48.tar.gz lz4-8c38ddd7e67354aa3205ac8c03e5b8f78f567a48.tar.bz2 |
Introduce : LZ4_compress_limitedOutput_usingDict()
Diffstat (limited to 'programs')
-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; } |