Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site turtlevax.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!dcdwest!ittvax!decvax!decwrl!turtlevax!ken From: ken@turtlevax.UUCP (Ken Turkowski) Newsgroups: net.graphics Subject: Re: Request for info on RUN-LENGTH CODE technique Message-ID: <603@turtlevax.UUCP> Date: Sun, 2-Dec-84 13:32:11 EST Article-I.D.: turtleva.603 Posted: Sun Dec 2 13:32:11 1984 Date-Received: Tue, 4-Dec-84 08:14:26 EST References: <4681@ukc.UUCP> Reply-To: ken@turtlevax.UUCP (Ken Turkowski) Distribution: net Organization: CADLINC, Inc. @ Menlo Park, CA Lines: 22 Keywords: runlength coding, sparse vector coding Depending on the complexity of image, runlength coding produces worse compression than a straight byte storage. A mixture of the two is helpful: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0| run length | color | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... +-+-+-+-+-+-+-+-+ |1|vector length| color0 | color1 | ... | color n-1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... +-+-+-+-+-+-+-+-+ I have called this a "sparse vector" type of representation. The runs are of length 128 (instead of 256) max, because the most significant byte is used to switch between runs and vectors. Depending on the measure used, the break-even point is a run of 3, 4, or 5. -- Ken Turkowski @ CADLINC, Menlo Park, CA UUCP: {amd,decwrl,flairvax,nsc}!turtlevax!ken ARPA: turtlevax!ken@DECWRL.ARPA