Path: utzoo!mnetor!uunet!husc6!bbn!uwmcsd1!ig!jade!ucbvax!decvax!tektronix!dadla!amadeus!jamesa From: jamesa@amadeus.TEK.COM (James Akiyama) Newsgroups: comp.sources.d Subject: Re: help with compress on XENIX Message-ID: <894@amadeus.TEK.COM> Date: 23 Dec 87 20:53:21 GMT References: <810@hyper.UUCP> <969@sask.UUCP> Organization: Tektronix Inc., Beaverton, Or. Lines: 29 Keywords: compress,xenix,4.0,help Summary: Compress Incompatibilities I believe that part of the non-compatibility of compress on 80X86 machines has to do with the Intel segmentation. It turns out that VAX versions use a 16 bit compression code which requires substantially more than 64K array sizes. Since most 80X86 systems are limited to a 64K array they generally only support a 12-bit compression code. I know of two fixes: 1. Compress using the '-b' switch and limit the compression to 12-bits. This will actually speed the compression up some although the percent compression will be somewhat reduced. 2. Obtain a modified compress routine which is designed for a 64K segmented architecture. This is generally done by splitting the internal arrays into several pieces --usually about 8; then using the upper three bits of the array subscript to determine which array to use. Note that this have a severe speed penalty on the 80X86 systems, generally decreasing the speed of the program to about half. If someone has problem locating this I can probably send you a copy over E-mail if you give me your full mail path. As to someone mentioning a problem on the VAX systems running Ultrix, here at Tektronix, we have not seen that problem on our systems. It turns out that the "#ifdef vax" statements use a Vax assembly instruction to generate the odd code sizes (9-16 bits) needed by compress. The Vax has a nifty instruction which allows you to access the nth word where each word is x-bits (e.g. get the 15th 14-bit word from an array). The normally compress code requires a lot of shift left, shift rights and multiplies. Hope this is of some help. James E. Akiyama