Encodes and Decodes .txt files