Text file is a kind of computer file, which is a typical sequential file, and its logical structure belongs to streaming file. A text file refers to a file stored in ASCII code (also called text mode). More precisely, characters such as English and numbers store ASCII codes, while Chinese characters store internal codes. A text file can't store any other information except the valid character information of the file (including carriage return, line break and other information that can be represented by ASCII characters).
A binary file refers to a file containing data or program instructions written in ASCII and extended ASCII characters. A binary file in a broad sense refers to a file, which is named because the storage form of the file in an external device is binary. A binary file in a narrow sense refers to a file other than a text file. A text file is a computer file composed of multiple lines of characters. Text files exist in computer systems, and the end of the file is usually placed on the last line of the text file. The encoding of text files is based on fixed-length characters, and decoding is relatively easy; Binary file coding is variable, which has high flexibility and utilization, but it is difficult to decode. Different binary files have different decoding methods.