4 ms·
Where is RLE encoding used a lot nowadays? Or is this code mostly an academic exercise?
by listic 11y ago
Where is RLE encoding used a lot nowadays? Or is this code mostly an academic exercise?
- mrits 11y agoIt is a great candidate anytime there is columnar storage of a database. Think of a column storage boolean value with 90% false values.
- nwmcsween 11y agoI would personally use a bit array with an associated value to indicate what 0 or 1 means.
- mrits 11y agoThat is a certain type of encoding. There is always overhead with this type. Columnar databases often provide lots of different encoding options (mixed in with compression) for these type of things. Products like Vertica can build the associativity for you ahead of time so you don't even have to maintain it. Also, I believe you misunderstood how a columnar storage would work as your example would be for encoding values on a single row where I was referring to a column type.
- xrstf 11y agoSavestates for Rollercoaster Tycoon 1 and 2 are RLE. Makes sense as a savestate is one fixed sized/positioned datastructure with many runs of null bytes. Doesn't fit the "a lot" usecase, but I wanted to at least give one real world example ;)
- infogulch 11y agoOK, a couple people posted examples. But wouldn't all of these get better compression out of an extremely low compression level gzip or something?