Article View: net.sources.bugs
Article #882ARC squeeze fix
From: Bennett Broder
Date: Fri, 26 Dec 1986 19:32
Date: Fri, 26 Dec 1986 19:32
48 lines
2156 bytes
2156 bytes
In article <390@monuxa.UUCP> john@monuxa.UUCP (John Ruschmeyer) writes:
>When the UNIX version of ARC was posted a while ago, I brought it up on
>our systems here. Unlike a recent poster to this newsgroup, I had no
>problem with the Lempel-Ziv (crunch) code, but never could get it to
>correctly squeeze or unsqueeze a file in an archive.
>
> ... Using code from that program I was able to fix the problem with
>ARC not correctly unsqueezing a file in the archive (creating either a
>zero-length file or giving the 'invalid decode tree' message).
>
>NOTE: I am still having problems with the squeeze code on our system. For
>some reason, trying to archive a file which would normally be squeezed on
>the MS-DOS version of ARC results in it being compressed with some
>less-efficient method. I think this is a bug, but it appears to be a
>harmless one.
In order to decide which compression routine to use, ARC estimates the
size of the resulting file. The squeezing routine was handicapped
considerably, since the routine calculating the squeezed file size was
figuring on using 16 bytes to store each integer.
Here are the diffs to remedy this problem.
*** arcsq.c Fri Dec 26 14:00:28 1986
--- arcsq.c.old Fri Dec 26 13:59:48 1986
***************
*** 18,24
*/
#include <stdio.h>
! #define int16size 2 /* 2 bytes */
/* stuff for Huffman squeezing */
--- 18,24 -----
*/
#include <stdio.h>
! #define int16size 16 /* 16 bits */
/* stuff for Huffman squeezing */
--
Ben Broder
{ihnp4,decvax} !hjuxa!catnip!ben
{houxm,clyde}/
Technical Details
Message-ID:
<441@catnip.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!clyde!cbatt!ihnp4!houxm!hjuxa!catnip!benReferences:
<390@monuxa.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!clyde!cbatt!ihnp4!houxm!hjuxa!catnip!ben From: ben@catnip.UUCP (Bennett Broder) Newsgroups: net.sources.bugs Subject: ARC squeeze fix Message-ID: <441@catnip.UUCP> Date: Fri, 26-Dec-86 14:32:25 EST Article-I.D.: catnip.441 Posted: Fri Dec 26 14:32:25 1986 Date-Received: Sat, 27-Dec-86 00:39:08 EST References: <390@monuxa.UUCP> Reply-To: ben@catnip.UUCP (Bennett Broder) Organization: The Broder Residence, Holmdel, NJ 07733 Lines: 48