Shop OBEX P1 Docs P2 Docs Learn Events
RLE Object or snippet in spin? — Parallax Forums

RLE Object or snippet in spin?

Does anyone know if there is a RLE (Run Length Encoding) object or code snippet that I could borrow?

Thanks,
Terry

Comments

  • What sort of data do you want to compress?

    Do you have an example of the raw data?

    Is the data being received from a sensor and then being set via a serial port?

    I got the impression from quick glance at RLE entry on Wikipedia that the RLE algorithms can be pretty simple.
  • kwinnkwinn Posts: 8,697
    Duane Degn wrote: »
    What sort of data do you want to compress?

    Do you have an example of the raw data?

    Is the data being received from a sensor and then being set via a serial port?

    I got the impression from quick glance at RLE entry on Wikipedia that the RLE algorithms can be pretty simple.

    RLE encoding generally is very simple. In general the output for lossless compression is a value and and the count of the number of times that value occurs. RLE an that permits some loss of data counts the number of times the value is within a specified range of values.
  • BMP image data. I can code it from the various examples available from Rosetta Code. Just didn't want to go through the exercise if there was one available.
  • @ke4pjw,

    This game by @Remz a few years back looks like it used RLE for video, not static BMPs, but maybe it would give you some ideas.

    http://forums.parallax.com/discussion/137493/project-brimborion

    Cheers,
    Jesse
Sign In or Register to comment.