🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #648

Re: Compression algorithms

#648
From: DON KAUFFMAN
Date: Mon, 28 Sep 1992 19:44
42 lines
2271 bytes
robert@solan.unit.no (Robert Schmidt) writes:

>Hi!
>
>As a part of my Data structures and Algorithms course, I came across
>the Huffman algorithm for finding an optimal, variable-length coding tree,
>for compressing data.
>
>I implemented this using C++ classes (a heap and a binary tree), and although
>it was fast, the compression ratio didn't impress me much, as you can
>well imagine.

	Maybe I missed the clue boat.   I thought that the optimal
	code for compressing a data set also produced the optimal
	compressed data set.  Is this not true?  I understand that
	in some cases there would be a more optimal algorithm than
	Huffman's, such as a variation of Huffman's that used
	samples of different lengths.  How could you NOT be impressed
	by its compression ratio, though?  The first thing that
	I imagine is that you didn't compress the coded bits into
	packed bytes, but saved them as their ascii values, '0',
	and '1'.  If that's the case, packing the bits would produce
	a coded file 1/8 of its current size, depending on the size
	of the original data set.  Was that your problem?  

>
>I was wondering if anyone have assembler, pascal, c or c++ sources for
>compression.  I'll appreciate anything, even if it doesn't compress
>very good, or is very slow.  I've used run-length encoding before, and have
>glanced at LZ coding.
>
>If I get enough nice replies, I'll collect them and send them to some binary
>archives or ftp sites (if such collections doesn't exist already, of course).
>
>And one more thing:  Please reply via e-mail!
>

	I would honor your request to reply via e-mail, but I
	wanted to ask everyone else out there the same question:
	Is there a more optimal coding algorithm?

						Don Kauffman
Technical Details
Message-ID: <kauffman.16.717709476@slab.unt.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!spool.mu.edu!sdd.hp.com!caen!uwm.edu!linac!convex!news.oc.com!mercury.unt.edu!PC-59269.slab.unt.edu!kauffman
References: <1992Sep28.135957.610@ugle.unit.no>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!spool.mu.edu!sdd.hp.com!caen!uwm.edu!linac!convex!news.oc.com!mercury.unt.edu!PC-59269.slab.unt.edu!kauffman
From: kauffman@slab.unt.edu (DON KAUFFMAN)
Newsgroups: alt.msdos.programmer
Subject: Re: Compression algorithms
Message-ID: <kauffman.16.717709476@slab.unt.edu>
Date: 28 Sep 92 19:44:36 GMT
References: <1992Sep28.135957.610@ugle.unit.no>
Sender: usenet@mercury.unt.edu (UNT USENet Adminstrator)
Organization: School of Library & Info Sci, UNT
Lines: 42