What's the purpose of this code in the original decompressor? Assuming c is an uchar, aren't EOF and 0xFF equal?
if (c == 0xFF) {
len = getchar();
c = getchar();
while (len--)
emit(c);
}