Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between .bin and .dat file?

Tags:

c

binaryfiles

When writing to a binary file, when should I use .bin vs .dat? If I'm just trying to store information not meant to be read by humans, like item description/serial number pair, does it matter which one I pick if I'm just trying to make it unreadable from a text editor?

like image 706
Duy Đặng Avatar asked Jan 03 '17 06:01

Duy Đặng


People also ask

Is a .dat file a binary file?

The DAT file format is a binary little-endian format file. It is composed of three sections: ASCII text header. Binary event type and size information.

What is a .dat file?

A DAT file is a data file that contains specific information about the program used to create it. This file always has the . dat file extension, which is a generic format that can contain any information – video, audio, PDF, and virtually any other type of file.

Is BIN file same as binary file?

A BIN file, also called a binary file, is a file format that contains information, like images and videos, from a CD or DVD. This format has gotten less use in recent years because of the popularity of digital media over CDs and DVDs, but it can still be useful when you need to access old data saved on your computer.

What program opens a DAT file?

DAT files are data files that contain information pertaining to the program that they're associated with. DAT files typically contain simple text, so they can usually be opened with a text editor like NotePad, TextEditor, or Notepad++, which is a free third party text editor.


3 Answers

Let me give you some brief details about these files :

.BIN File : The BIN file type is primarily associated with 'Binary File'. Binary files are used for a wide variety of content and can be associated with a great many different programs. In general, a .BIN file will look like garbage when viewed in a file editor.

.DAT File : The DAT file type is primarily associated with 'Data'. Can be just about anything: text, graphic, or general binary data. Data file in special format or ASCII.

Reference: Abhijit Banerjee answered that question on quora

like image 158
Emtiaz Zahid Avatar answered Sep 28 '22 12:09

Emtiaz Zahid


.dat is a more frequently used suffix for binary data. It doesn't matter what extension you pick, as long as you are on Unix or Linux based systems.

like image 21
codeforester Avatar answered Sep 28 '22 12:09

codeforester


Sufixes can mean whatever you want them to mean... Those rules are more like guidelines than actual rules...

However, BIN seems like a short to binary, so a BIN file will likely hold data in binary form. DAT seems like a short to data, so a DAT file will contain information in whatever format the developer of the program that reads that file seems fit (ASCII, Binary, a mix of them, something else entirely)

like image 35
Luiz Menezes Avatar answered Sep 28 '22 10:09

Luiz Menezes