But .txt is not the same as .rs; yet .txt is not the same as .docx, although both of these files look the same to the human eye.
But .txt is not the same as .rs; yet .txt is not the same as .docx, although both of these files look the same to the human eye.
There are thousands of types of file. They all contain data as a long sequence of numbers, and how those numbers are interpreted depends on the type of file - text characters, floating point numbers, pixel colour information or compressed data
images are pixel colour information while audio and video are compressed data ?
Depends on the file format. There is compressed and uncompressed audio - some times the numbers just represent the audio waveform (e.g. .wav) - some times with lossy lossless compression. Most, but not all, video formats are compressed due to the data size
It’s pretty hard to break file types into these discrete categories. Images can be raw pixel colours (see ppm), losslessly compressed pixel data (see png), or lossily compressed pixel data (see jpeg).
There’s as many files as applications use. But just to make a point following your reasoning, you should include CAD, sliced and blender files at least to cover 3D objects.