[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] Config option for enabling gzip bigmem
From: Ian Wienand <ianw () vmware ! com>
Date: 2011-08-29 21:47:47
Message-ID: 4E5C0903.4050204 () vmware ! com
[Download RAW message or body]
On 08/26/2011 02:07 AM, walter harms wrote:
> CONFIG_MD5_SIZE_VS_SPEED=2
Thanks, that looks good. I've modified the patch to use a range 0 - 2
which corresponds to small, medium and large as defined by the gzip.c
file
-i
Signed-off-by: Ian Wienand <ianw@vmware.com>
---
archival/Config.src | 12 ++++++++++++
archival/gzip.c | 10 +++++++++-
2 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/archival/Config.src b/archival/Config.src
index 81788ec..8816269 100644
--- a/archival/Config.src
+++ b/archival/Config.src
@@ -187,6 +187,18 @@ config FEATURE_GZIP_LONG_OPTIONS
help
Enable use of long options, increases size by about 106 Bytes
+config GZIP_SIZE_VS_SPEED
+ int "Trade memory for gzip speed (0:small, slow -- 2:fast, big)"
+ default 0
+ range 0 2
+ depends on GZIP
+ help
+ Enable big memory options for gzip.
+ 0 : small buffers, small hash-tables
+ 1 : larger buffers, larger hash-tables
+ 2 : larger buffers, largest hash-tables
+ Larger models may give slightly better compression
+
config LZOP
bool "lzop"
default y
diff --git a/archival/gzip.c b/archival/gzip.c
index 403eb4d..0dc1633 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -81,7 +81,15 @@ aa: 85.1% -- replaced with aa.gz
/*
===========================================================================
*/
-#define SMALL_MEM
+#if CONFIG_GZIP_SIZE_VS_SPEED == 2
+# define BIG_MEM
+#elif CONFIG_GZIP_SIZE_VS_SPEED == 1
+# define MEDIUM_MEM
+#elif CONFIG_GZIP_SIZE_VS_SPEED == 0
+# define SMALL_MEM
+#else
+# error "Invalid CONFIG_GZIP_SIZE_VS_SPEED value"
+#endif
#ifndef INBUFSIZ
# ifdef SMALL_MEM
--
1.7.4.1
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic