35 lines
935 B
Diff
35 lines
935 B
Diff
From c3644836a013841efd385a05e6f250985c024dfe Mon Sep 17 00:00:00 2001
|
|
From: hexiaowen <hexiaowen@huawei.com>
|
|
Date: Fri, 3 May 2019 16:06:24 +0800
|
|
Subject: [PATCH] ncompress: compression with 9 bits don't work
|
|
|
|
---
|
|
compress42.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/compress42.c b/compress42.c
|
|
index 834c2f2..19a4043 100644
|
|
--- a/compress42.c
|
|
+++ b/compress42.c
|
|
@@ -233,7 +233,7 @@
|
|
#define FIRST 257 /* first free entry */
|
|
#define CLEAR 256 /* table clear output code */
|
|
|
|
-#define INIT_BITS 9 /* initial number of bits/code */
|
|
+#define INIT_BITS 8 /* initial number of bits/code */
|
|
|
|
#ifndef SACREDMEM
|
|
/*
|
|
@@ -835,7 +835,7 @@ main(argc, argv)
|
|
nextarg: continue;
|
|
}
|
|
|
|
- if (maxbits < INIT_BITS) maxbits = INIT_BITS;
|
|
+ if (maxbits <= INIT_BITS) maxbits = INIT_BITS + 1;
|
|
if (maxbits > BITS) maxbits = BITS;
|
|
|
|
if (*filelist != NULL)
|
|
--
|
|
1.8.3.1
|
|
|