我对文件类型和文件格式有些困惑。是不是文档是一种文件类型,而 PDF 是一种文件格式?或者视频是一种文件类型,而 MP4 是一种文件格式?
答案1
文件类型是文件的扩展名。例如.pdf
,等等.mp4
。.exe
文件格式更像是某种文件类型的数据结构:
A文件格式定义文件中数据的语法(允许的值、形式结构/“语法”)和语义(含义和解释)。因此,它表示信息到一维二进制内存的双向映射。
Knowing the file format is essential for interpreting the information stored in a file. Modern operating systems use the file format to assign files to applications that can interpret the files.
e.g mp4 is one of many video file formats but it's the only mp4 file type. because file type is just the extension. video file format would be more of an umbrella term for all the file formats that represent videos. there are multiple video file formats with different file types (extensions) which all can be summarised as video file format. read it more detailed on wikipedia
but yes, if someone would ask you: "What file format is the .mp4 file type?" you could answer: "it's a video file format".