Perhaps http://rosettacode.org/wiki/Run-length_encoding#J
Thanks, -- Raul On Mon, Jun 29, 2015 at 11:55 AM, John Baker <[email protected]> wrote: > I vaguely remember reading forum traffic sometime ago about a simple > J based run length encoding verb for integers. > > eg: > > If you have list of integers with many runs of the same value. > > 0 0 0 0 0 0 2 4 4 4 4 2 0 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 0 2 > 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > > What's a good way to compress, and decompress, this using only J? > > Just thought I would ask before rolling my own. > > -- > John D. Baker > [email protected] > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
