gzip on PDP-11: not so simple

Greg Lehey grog at lemis.com
Wed Mar 25 17:11:36 AEST 1998


On Wed, 25 March 1998 at 17:43:00 +1000, Peter Chubb wrote:
>>>>>> "Greg" == Greg Lehey <grog at lemis.com> writes:
>
> Greg> OK, I've found the problems with gzip, and they're not
> Greg> encouraging.  It would appear that the undefined references are
> Greg> undefined because they refer to data which is too large.  Here's
> Greg> the preprocessor output:
>
> Greg>   uch inbuf[ 0x8000 + 64 ]; uch outbuf[ 16384 +2048 ]; ush
> Greg> d_buf[ 0x8000 ]; uch window[ 2*0x8000 ]; # 194 "gzip.c"
>
> You need to decrease the window size -- try setting it to 8k (instead
> of 32k)
>
> There should be a
> #define WSIZE 0x8000
> somewhere.

Correct.  Unfortunately, it's not as simple as that.  Here's the
definition:

#ifndef WSIZE
#  define WSIZE 0x8000     /* window size--must be a power of two, and */
#endif                     /*  at least 32K for zip's deflate method */

> It may be worth playing with a decompress only version -- compression
> will take more space than decompression (you need two windows rather
> than one, for a start).

Yes, that was really what I was thinking of doing with unzip, rather
than excising the unzip part from gunzip.

> inbuf can be smaller, too.  Try 512 bytes to match the disc record
> size.

Sure, once I get into serious modifications I can try a number of
things.  The trouble is, I just don't have the time.  I thought it was
worth 15 minutes to see what it would do, and the first attempts
looked encouraging.  Unfortunately, the second attempts didn't :-(

Greg

Received: (from major at localhost)
	by minnie.cs.adfa.oz.au (8.8.5/8.8.5) id AAA21748
	for pups-liszt; Thu, 26 Mar 1998 00:20:28 +1100 (EST)
X-Authentication-Warning: minnie.cs.adfa.oz.au: major set sender to owner-pups at minnie.cs.adfa.oz.au using -f


More information about the TUHS mailing list