summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPrzemyslaw Skibinski <inikep@gmail.com>2016-11-11 07:55:19 (GMT)
committerPrzemyslaw Skibinski <inikep@gmail.com>2016-11-11 07:55:19 (GMT)
commit9d075580decdd1de70c9f4f612d6df5999adbe22 (patch)
treeb0e1a1d5cacd3dcc9c5ae9b5940176fe211c733c /tests
parent52251d970956c992801b6b7434fe092751f7731e (diff)
parent4f9db1383a749e503e210ec6a712be67f31cfb1d (diff)
downloadlz4-9d075580decdd1de70c9f4f612d6df5999adbe22.zip
lz4-9d075580decdd1de70c9f4f612d6df5999adbe22.tar.gz
lz4-9d075580decdd1de70c9f4f612d6df5999adbe22.tar.bz2
Merge remote-tracking branch 'refs/remotes/lz4/dev' into dev
Diffstat (limited to 'tests')
-rw-r--r--tests/fullbench.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/fullbench.c b/tests/fullbench.c
index 975cf8a..fa37fa6 100644
--- a/tests/fullbench.c
+++ b/tests/fullbench.c
@@ -386,7 +386,7 @@ static int local_LZ4_decompress_safe_partial(const char* in, char* out, int inSi
/* frame functions */
static int local_LZ4F_compressFrame(const char* in, char* out, int inSize)
{
- return (int)LZ4F_compressFrame(out, 2*inSize + 16, in, inSize, NULL);
+ return (int)LZ4F_compressFrame(out, LZ4F_compressFrameBound(inSize, NULL), in, inSize, NULL);
}
static LZ4F_decompressionContext_t g_dCtx;
@@ -532,9 +532,11 @@ int fullSpeedBench(const char** fileNamesTable, int nbFiles)
chunkP[0].origSize = (int)benchedSize; nbChunks=1;
break;
case 40: compressionFunction = local_LZ4_saveDict; compressorName = "LZ4_saveDict";
+ if (chunkP[0].origSize < 8) { DISPLAY(" cannot bench %s with less then 8 bytes \n", compressorName); continue; }
LZ4_loadDict(&LZ4_stream, chunkP[0].origBuffer, chunkP[0].origSize);
break;
case 41: compressionFunction = local_LZ4_saveDictHC; compressorName = "LZ4_saveDictHC";
+ if (chunkP[0].origSize < 8) { DISPLAY(" cannot bench %s with less then 8 bytes \n", compressorName); continue; }
LZ4_loadDictHC(&LZ4_streamHC, chunkP[0].origBuffer, chunkP[0].origSize);
break;
case 60: DISPLAY("Obsolete compression functions : \n"); continue;