A binary file is usually very much smaller than a text file that contains an equivalent amount of data.
What is text file and binary file. These bits combinations can refer to custom data. Using a system of numbers that uses only 0 and 1. In text file the text and characters will store one char per byte.
Binary file may contain encrypted or encoded or compr. Any file where besides the actual written characters and newlines there are other symbols as well. Reading binary files is very similar to reading text files.
Writing to a Binary File I mentioned once that. For image video and audio data this is important. An error in a text file can be eliminated when seen.
Some examples of binary files are program files image files and most other program data files. Read print binary data list binary print data f. A binary file is basically any file that is not line-oriented.
This is typically done so humans can read it. Binary files can store multiple types of data such as images audio text etc. Binary files are used to store data more compactly.
So a program written in the C programming language is a text file but after you compiled it the compiled version is binary. The data within them is a binary representation of some information. For example the integer value 4567 will occupy 2 bytes in memory but it will occupy 5 bytes in text file.