Pure-Perl implementation of scaling LZW