Move to 4KB Cut-Off
authorW. Felix Handte <w@felixhandte.com>
Tue, 6 Mar 2018 16:52:02 +0000 (11:52 -0500)
committerW. Felix Handte <w@felixhandte.com>
Mon, 12 Mar 2018 18:58:43 +0000 (14:58 -0400)
lib/lz4.c

index 4810910..d147681 100644 (file)
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -540,7 +540,7 @@ LZ4_FORCE_INLINE void LZ4_resetTable(
       (tableType == byU32 &&
        cctx->currentOffset > 1 GB) ||
       tableType == byPtr ||
-      inputSize >= 2 KB))
+      inputSize >= 4 KB))
   {
       DEBUGLOG(4, "Resetting table in %p", cctx);
       MEM_INIT(cctx->hashTable, 0, LZ4_HASHTABLESIZE);
@@ -1227,7 +1227,7 @@ int LZ4_compress_fast_continue (LZ4_stream_t* LZ4_stream, const char* source, ch
              * dictCtx->currentOffset - dictCtx->dictSize. This makes it safe
              * to use noDictIssue even when the dict isn't a full 64 KB.
              */
-            if (inputSize > 2 KB) {
+            if (inputSize > 4 KB) {
                 /* For compressing large blobs, it is faster to pay the setup
                  * cost to copy the dictionary's tables into the active context,
                  * so that the compression loop is only looking in one table.