RUN-LENGTH ENCODING (RLE)

$4
Publisher Uelstudios - Assets
File size 28.14kB
Number of files 5
Latest version 1
Latest release date 2017-08-28 05:05:22
First release date 2017-08-09 09:16:21
Supported Unity versions 2018.4.2 or higher
Run-length encoding is a way to shrink down the amount of data needed for saving or sending worlds/texts/ etc.

run-length encoding is simple to understand.
E.g. if your 1D voxel-world is build out of stone like this:
[STONE] [STONE] [STONE] [STONE] [STONE]
your internal data probably looks something like this
a,a,a,a,a (a is representing STONE)
This asset now takes your data and transforms a,a,a,a,a INTO => 5a.
Super Simple but immensely effective!
Furthermore if your data-structure uses numbers and not characters (e.g. a for stone) this asset contains a NumberToCharacter and CharacterToNumber Parser! This makes it really simple to compress your data!


disclaimer: Out of the box this asset supports 52 different data values. This means in a tile world you can have at most 52 different tiles. This limit can be expanded by yourself! Also there are a lot of ways to bypass this limit.
----
All scripts are fully commented and can be changed to fit your needs.
Watch the video below to get a better idea what this asset is all about!
Video: Youtube Demo