MINMATCH=3 or 4 selected in ZSTD frame
diff --git a/lib/zstd_compress.c b/lib/zstd_compress.c
index 8e572b4..bb15afb 100644
--- a/lib/zstd_compress.c
+++ b/lib/zstd_compress.c
@@ -2144,7 +2144,7 @@
     if (ZSTD_isError(errorCode)) return errorCode;
 
     MEM_writeLE32(zc->headerBuffer, ZSTD_MAGICNUMBER);   /* Write Header */
-    ((BYTE*)zc->headerBuffer)[4] = (BYTE)(params.windowLog - ZSTD_WINDOWLOG_ABSOLUTEMIN);
+    ((BYTE*)zc->headerBuffer)[4] = (BYTE)(params.windowLog - ZSTD_WINDOWLOG_ABSOLUTEMIN + ((params.searchLength==3)<<4));
     zc->hbSize = ZSTD_frameHeaderSize_min;
     zc->stage = 0;
 
@@ -2259,7 +2259,7 @@
 
 /*-=====  Pre-defined compression levels  =====-*/
 
-#define ZSTD_MAX_CLEVEL 22
+#define ZSTD_MAX_CLEVEL 25
 unsigned ZSTD_maxCLevel(void) { return ZSTD_MAX_CLEVEL; }
 
 
@@ -2284,11 +2284,14 @@
     {  0, 23, 23, 23,  0,  5,  5,  4, ZSTD_lazy2   },  /* level 15 */
     {  0, 23, 22, 22,  0,  5,  5,  4, ZSTD_btlazy2 },  /* level 16 */
     {  0, 24, 24, 23,  0,  4,  5,  4, ZSTD_btlazy2 },  /* level 17 */
-    {  0, 24, 24, 23, 16,  5,  5, 30, ZSTD_btopt   },  /* level 18 */
-    {  0, 25, 25, 24, 16,  5,  4, 40, ZSTD_btopt   },  /* level 19 */
-    {  0, 26, 26, 25, 16,  8,  4,256, ZSTD_btopt   },  /* level 20 */
-    {  0, 26, 27, 25, 24, 10,  4,256, ZSTD_btopt   },  /* level 21 */
-    {  0, 26, 26, 25, 16,  8,  3,256, ZSTD_btopt   },  /* level 20+MM3 */
+    {  0, 24, 24, 23,  0,  5,  5, 30, ZSTD_btopt   },  /* level 18 */
+    {  0, 25, 25, 24,  0,  5,  4, 40, ZSTD_btopt   },  /* level 19 */
+    {  0, 26, 26, 25,  0,  8,  4,256, ZSTD_btopt   },  /* level 20 */
+    {  0, 26, 27, 25,  0, 10,  4,256, ZSTD_btopt   },  /* level 21 */
+    {  0, 24, 24, 23, 16,  5,  3, 30, ZSTD_btopt   },  /* level 22 */
+    {  0, 25, 25, 24, 16,  5,  3, 40, ZSTD_btopt   },  /* level 23 */
+    {  0, 26, 26, 25, 16,  8,  3,256, ZSTD_btopt   },  /* level 24 */
+    {  0, 26, 27, 25, 24, 10,  3,256, ZSTD_btopt   },  /* level 25 */
 },
 {   /* for srcSize <= 256 KB */
     /* l,  W,  C,  H, H3,  S,  L,  T, strat */