support write encode data into file in binary