A javascript native encode/decoder for ttyrec files/records