]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: client: compress: increase LZ77_MATCH_MAX_DIST
authorEnzo Matsumiya <ematsumiya@suse.de>
Mon, 13 Apr 2026 19:07:09 +0000 (16:07 -0300)
committerSteve French <stfrench@microsoft.com>
Wed, 22 Apr 2026 14:55:38 +0000 (09:55 -0500)
Increase max distance (i.e. window size) from 1k to 8k.
This allows better compression and is just as fast.

Other:
- drop LZ77_MATCH_MIN_DIST as it's nused -- main loop
  already checks if dist > 0

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/compress/lz77.c

index 61cdf1c146127283f781597a8a5599b96d7048c3..480927dcd4c65be799314bb1eea9b5da89c67cd9 100644 (file)
@@ -17,8 +17,7 @@
  * Compression parameters.
  */
 #define LZ77_MATCH_MIN_LEN     4
-#define LZ77_MATCH_MIN_DIST    1
-#define LZ77_MATCH_MAX_DIST    SZ_1K
+#define LZ77_MATCH_MAX_DIST    SZ_8K
 #define LZ77_HASH_LOG          15
 #define LZ77_HASH_SIZE         (1 << LZ77_HASH_LOG)
 #define LZ77_STEP_SIZE         sizeof(u64)