[net.unix] Wanted:Compaction Algorithm

pkm@pierce.UUCP (P.K. Maheshwari) (02/19/86)

	TO WHOM IT MAY CONCERN
	----------------------

I am in need of a packing algorithm which works better than the
PACK Utility of UNIX.  I have also looked at COMPRESS ( developed
at University of Utah ).  COMPRESS works great if distinct number
of input bytes is small.  But if the distinct input bytes reach
256 ( binary data ), PACK works better than COMPRESS.  With PACK
I am getting a saving of 20-25%.  If anybody has an algorithm
that would do better in packing "load modules", I would like to
know about it.

THNX...........Padam

Name:			Padam Maheshwari
Phone:			(201) 580-4552
Organization:		AT&T Bell Labs
Address:		3ND15
			184 Liberty Corner Rd
			Warren, NJ 07060-0908
NET Mail Address:	ihnp4!pierce!pkm

thomas@utah-gr.UUCP (Spencer W. Thomas) (02/20/86)

Actually, compress works best if there are repeated SEQUENCES in the
input data.  It doesn't really matter so much how many different codes
there are, except that one is more likely to get repeated sequences if
there are fewer codes.

-- 
=Spencer   ({ihnp4,decvax}!utah-cs!thomas, thomas@utah-cs.ARPA)

guy@sun.uucp (Guy Harris) (02/20/86)

> I am in need of a packing algorithm which works better than the
> PACK Utility of UNIX.  I have also looked at COMPRESS ( developed
> at University of Utah ).  COMPRESS works great if distinct number
> of input bytes is small.  But if the distinct input bytes reach
> 256 ( binary data ), PACK works better than COMPRESS.  With PACK
> I am getting a saving of 20-25%.  If anybody has an algorithm
> that would do better in packing "load modules", I would like to
> know about it.

Are you sure you have the latest version of "compress"?  I tried "pack"ing
and "compress"ing "/usr/bin/suntools" (which is a BMF executable image) and
"compress" did significantly better than "pack" did (it took significantly
more time doing it, but that's life).  Remember, Lempel-Ziv compression will
discover frequently-occurring sequences of bytes, and unless your machine
has all one-byte instructions you're likely to get some multi-byte sequences
occurring frequently.
-- 
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.arpa	(yes, really)