I tried implementing LZW encoding/decoding and ended up with the following code
#include #include #include #i