tested encode binary files