TextFileDecoder: more code, still not tested