changed long length format
diff --git a/lib/zstd_compress.c b/lib/zstd_compress.c
index 3dd8651..c89d5ca 100644
--- a/lib/zstd_compress.c
+++ b/lib/zstd_compress.c
@@ -718,7 +718,7 @@
 */
 MEM_STATIC void ZSTD_storeSeq(seqStore_t* seqStorePtr, size_t litLength, const BYTE* literals, size_t offsetCode, size_t matchCode)
 {
-#if 0
+#if 0  /* for debug */
     static const BYTE* g_start = NULL;
     if (g_start==NULL) g_start = literals;
     //if (literals - g_start == 8695)
@@ -737,7 +737,13 @@
             *(seqStorePtr->dumps++) = (BYTE)(litLength - MaxLL);
         } else {
             *(seqStorePtr->dumps++) = 255;
-            MEM_writeLE32(seqStorePtr->dumps, (U32)litLength); seqStorePtr->dumps += 3;
+            if (litLength < (1<<15)) {
+                MEM_writeLE16(seqStorePtr->dumps, (U16)(litLength<<1));
+                seqStorePtr->dumps += 2;
+            } else {
+                MEM_writeLE32(seqStorePtr->dumps, (U32)((litLength<<1)+1));
+                seqStorePtr->dumps += 3;
+            }
     }   }
     else *(seqStorePtr->litLength++) = (BYTE)litLength;
 
@@ -751,7 +757,13 @@
             *(seqStorePtr->dumps++) = (BYTE)(matchCode - MaxML);
         } else {
             *(seqStorePtr->dumps++) = 255;
-            MEM_writeLE32(seqStorePtr->dumps, (U32)matchCode); seqStorePtr->dumps += 3;
+            if (matchCode < (1<<15)) {
+                MEM_writeLE16(seqStorePtr->dumps, (U16)(matchCode<<1));
+                seqStorePtr->dumps += 2;
+            } else {
+                MEM_writeLE32(seqStorePtr->dumps, (U32)((matchCode<<1)+1));
+                seqStorePtr->dumps += 3;
+            }
     }   }
     else *(seqStorePtr->matchLength++) = (BYTE)matchCode;
 }
diff --git a/lib/zstd_decompress.c b/lib/zstd_decompress.c
index 6061c87..5d637d2 100644
--- a/lib/zstd_decompress.c
+++ b/lib/zstd_decompress.c
@@ -626,8 +626,9 @@
         U32 add = *dumps++;
         if (add < 255) litLength += add;
         else {
-            litLength = MEM_readLE32(dumps) & 0xFFFFFF;  /* no pb : dumps is always followed by seq tables > 1 byte */
-            dumps += 3;
+            litLength = MEM_readLE32(dumps) & 0xFFFFFF;  /* no risk : dumps is always followed by seq tables > 1 byte */
+            if (litLength&1) litLength>>=1, dumps += 3;
+            else litLength = (U16)(litLength)>>1, dumps += 2;
         }
         if (dumps >= de) dumps = de-1;   /* late correction, to avoid read overflow (data is now corrupted anyway) */
     }
@@ -659,7 +660,8 @@
         if (add < 255) matchLength += add;
         else {
             matchLength = MEM_readLE32(dumps) & 0xFFFFFF;  /* no pb : dumps is always followed by seq tables > 1 byte */
-            dumps += 3;
+            if (matchLength&1) matchLength>>=1, dumps += 3;
+            else matchLength = (U16)(matchLength)>>1, dumps += 2;
         }
         if (dumps >= de) dumps = de-1;   /* late correction, to avoid read overflow (data is now corrupted anyway) */
     }
@@ -671,7 +673,7 @@
     seq->matchLength = matchLength;
     seqState->dumps = dumps;
 
-#if 0
+#if 0   /* debug */
     {
         static U64 totalDecoded = 0;
         printf("pos %6u : %3u literals & match %3u bytes at distance %6u \n",