open file raw instead of opening then binmoding
when decoding a file, call "decode"

not "encode"