Encode and Decode, but bug with EOF
Encode and Decode, but bug with EOF