|
I don't quite understand the following sentence:
"When reading a text file into memory, you need to convert the ASCII code to binary code, and when writing the file to the disk in text mode, you also need to convert the binary code to ASCII code, so reading and writing the text file takes more Conversion time. There is no such conversion for reading and writing binary files. "
May I have the following understanding? For example, the value of the character "A" is 41, and there is only one storage format in memory, which is binary "101001", and if it is stored on the hard disk, there are two ways: It is 7 bytes, which respectively store the ASCII code value of the characters 1,0,1,0,0,1; if it is a binary file, it is the binary value "100001" of the decimal value 41, using only one byte. |
|