Oriented Run-Length Compression

Run-length encoding splits data into runs of identical elements and stores just the length of each run with its first element. For run-length encoding of square arrays of binary data, it is sufficent to store the value repeated in the first run. In this Demonstration our data matrices are generated by evolutions of elementary cellular automata. The compressed run lengths are stored by a self-delimited ternary representation that stores each ternary digit as a pair of bits and ends each run specification by a pair of ones. The number of bits required to store generated data and compressed data are given as plot labels. Observe that some matrices compress better if they are transposed first. Note that the distinction between transposition or non-transposition of input requires one additional bit.
comments
 
Powered by Wolfram Mathematica
Give us your feedback
Give us your feedback

Source page:




 often  occasionally  never

Note: Please do not include anything you consider confidential or proprietary. Your message and contact information may be shared with the author of any specific Demonstration for which you give feedback, but will not otherwise be published or distributed.
Privacy Policy »

Note: To run this Demonstration you need the free
Mathematica Player
or Mathematica 7+
Download or upgrade to Mathematica Player 7
I already have Mathematica Player or Mathematica 7+