Inspiration
I always wanted to do this, but I was too busy with another program that would convert a file's contents to binary. It's also one of the easiest widely-used compression algorithms out there.
What it does
Say you have a string of repeating characters, like "WWWWWWWWWWBBBBBWWWWW". Using Run-length encoding, you can shorten it to 10W5B5W (Or W10B5W5, depending on your format preference.)
How I built it
I used regular expressions to create the structure of the format, and mostly a ton of strings and stringstreams.
Challenges I ran into
This was originally going to be on C, not C++. After some hours of frustration and rage quiting, I changed to C++, since I knew that it had better and more advanced features.
Accomplishments that I'm proud of
Actually getting the thing working.
What I learned
Run-length encoding is much more complicated than I thought.
What's next for A RLE Implementation In C++
Actually getting it to encode an entire file to this format. The file included is just a proof-of-concept using standard input for the string to encode.
Log in or sign up for Devpost to join the conversation.