encode repeats starting from 3 bytes instead of 4, ignore newlines while decoding, more tests