generic rle encoder by Bartlomiej Wolowiec b.wolowiec students mimuw edu pl