Difference between revisions of "Run-length encoding"

From ScienceZero
Jump to: navigation, search
(Stack run)
Line 8: Line 8:
 
Indexed graphics, 8 bits per pixel. The range 0 to n was used by pixel data. The range n + 1 to 255 was the run lengths. Run-length = (byte - n) + 1. The main goals were fast, simple and compressible with ZIP for distribution.
 
Indexed graphics, 8 bits per pixel. The range 0 to n was used by pixel data. The range n + 1 to 255 was the run lengths. Run-length = (byte - n) + 1. The main goals were fast, simple and compressible with ZIP for distribution.
  
== Stack run ==
+
== Stack-run based ideas ==
 +
 
 +
=== ??===
 
  00 - 0
 
  00 - 0
 
  11 - 1
 
  11 - 1
Line 14: Line 16:
 
  01 - run
 
  01 - run
 
   
 
   
 +
=== Alterrnating black/white runs ==
 
  00 - 0
 
  00 - 0
 
  11 - 1
 
  11 - 1
 
  10 - 0 end
 
  10 - 0 end
 
  01 - 1 end
 
  01 - 1 end

Revision as of 23:46, 27 January 2011

Atari ST - Savage Paint - PAC compression

Single bit plane. The five most common bytes in the image was followed by a run length byte. It was simpler and gave higher a compression ratio than the run-length algorithm used in the .IFF format on the Amiga. The reason for using the 5 most common bytes was mainly because of the number of free registers in the MC68000 CPU.

Amiga - IFF - RLE compression

One or more bit planes. Runs longer than 2 bytes are encoded as -1 to -127 followed by the byte to be repeated (-n) + 1 times. Runs of different bytes are stored as 0 to 127 followed by n + 1 bytes of data. The byte code -128 is a no operation.

Head-On - BEAR3 compression

Indexed graphics, 8 bits per pixel. The range 0 to n was used by pixel data. The range n + 1 to 255 was the run lengths. Run-length = (byte - n) + 1. The main goals were fast, simple and compressible with ZIP for distribution.

Stack-run based ideas

??

00 - 0
11 - 1
10 - data
01 - run

= Alterrnating black/white runs

00 - 0
11 - 1
10 - 0 end
01 - 1 end