[Israel.pm] binary vectors representation

Shlomo Yona shlomo at cs.haifa.ac.il
Sun Jun 13 07:40:44 PDT 2004


On Sun, 13 Jun 2004, Shlomi Fish wrote:

> Run Length Encoding (or RLE for short) is a method of encoding that replaces 
> every sequence of 1 or more identical values with the a pair that contains 
> the value and the number of items it was repeated. For example:
> 
> 1,1,1,1,2,2,3,3,3,3,3,1,1
> 
> ===>
> 
> (1*4),(2*2),(3*5),(1*2)
> 
> This will work well if you have many (especially long) sequences of identical 
> values, and will perform quite poorly otherwise.

Oh! Right.
Well -- I'm not going to implement this on top of everything
else, and I'm not sure if it is worth the hassle.
I'll probably get the same amount of data as I will by
listing only the nonzero items. And the latter method is
very simple.


-- 
Shlomo Yona
shlomo at cs.haifa.ac.il
http://cs.haifa.ac.il/~shlomo/



More information about the Perl mailing list