bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patches to allow HASH_BITS > 15


From: John Reiser
Subject: patches to allow HASH_BITS > 15
Date: Tue, 18 Jun 2013 08:38:01 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

In gzip I want to try HASH_BITS greater than 15, but deflate.c interferes:
   #if HASH_BITS > BITS-1
      error: cannot overlay head with tab_prefix1

Investigation shows that the data space for LZW compress acts as the master,
with zip deflate being a slave whose arrays never can be larger.

Attached are two patches which make the two sides more equal.
The first patch prepares the way by renaming BITS to LZW_BITS
and creating new header file deflate.h similar to lzw.h.
The second patch uses MAX() when overlaying arrays, which allows
either to be larger.  (Beware 'sizeof' any previous master.)

Now I can vary HASH_BITS and LZW_BITS independently.

-- 

Attachment: 0001-Prepare-to-overlay-arrays-in-either-order-zip-deflat.patch
Description: Text Data

Attachment: 0002-Use-MAX-for-array-overlays.-Prefer-prev-head-window-.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]