Binary files are usually thought of as being a sequence of
bytes, which means the binary digits (
bits) are grouped in eights. Binary files typically contain bytes that are intended to be interpreted as something other than text
characters.
Compiled computer programs are typical examples; indeed, compiled applications are sometimes referred to, particularly by programmers, as
binaries. But binary files can also mean that they contain images, sounds, compressed versions of other files, etc. – in short, any type of file content whatsoever. Some binary files contain
headers, blocks of
metadata used by a
computer program to interpret the data in the file. The header often contains a
signature or magic number which can identify the format. For example, a
GIF file can contain multiple images, and headers are used to identify and describe each block of image data. The leading bytes of the header would contain text like GIF87a or GIF89a that can identify the binary as a
GIF file. If a binary file does not contain any headers, it may be called a
flat binary file. A text file may consist partly or entirely of encoded binary information. When sending binary files over the network they may be encoded so that they use only printable characters. This is often necessary due to the limitations of network protocols used for internet browsing and e-mail communication. One such encoding is
Base64. Also, files containing public-key and private-key information for use in systems employing
asymmetric cryptography (such as
website certificates) may also be stored with the binary information encoded in printable characters. == Manipulation ==