Recent from talks
File format
Knowledge base stats:
Talk channels stats:
Members stats:
File format
A file format is the way that information is encoded for storage in a computer file. It may describe the encoding at various levels of abstraction including low-level bit and byte layout as well high-level organization such as markup and tabular structure. A file format may be standarized (which can be proprietary or open) or it can be an ad hoc convention.
Some file formats are designed for very particular types of data: PNG files, for example, store bitmapped images using lossless data compression. Other file formats, however, are designed for storage of several different types of data: the Ogg format can act as a container for different types of multimedia including any combination of audio and video, with or without text (such as subtitles), and metadata. A text file can contain any stream of characters, including possible control characters, and is encoded in one of various character encoding schemes. Some file formats, such as HTML, scalable vector graphics, and the source code of computer software are text files with defined syntaxes that allow them to be used for specific purposes.
Some file formats have a published specification describing the format and possibly how to verify correctness of data in that format. Such a document is not available for every format; sometimes because the format is considered a trade secret, and sometimes because a document was not authored. Sometimes, a format is defined de facto by the behavior of the program that accesses the file.
If there is no specification available, a developer might reverse engineer the format by inspecting files in that format or acquire the specification for a fee and by signing a non-disclosure agreement. Due to the time and money cost of these approaches, file formats with publicly available specifications tend to be supported by more programs.
Patent law (rather than copyright) can be used to protect the intellectual property inherent in a file format. Although a patent for a file format is not directly permitted under US law, some formats encode data using a patented algorithm. For example, prior to 2004, using compression with the GIF file format required the use of a patented algorithm, and though the patent owner did not initially enforce their patent, they later began collecting royalty fees. This has resulted in a significant decrease in the use of GIFs, and is partly responsible for the development of the alternative PNG format. However, the GIF patent expired in the US in mid-2003, and worldwide in mid-2004.
Both users and applications need to identify a file's format so that the file can be used appropriately. Generally, the methods for identification vary by operating system, with each approach having its advantages and disadvantages.
One popular method used by many operating systems, including Windows, macOS, CP/M, MS-DOS, VMS, and VM/CMS, is to indicate the format of a file with a suffix of the file name, known as the extension. For example, an HTML document is identified by a file name that ends with .html or .htm, and a GIF image by .gif.
In the now-antiquated FAT file system, file names were limited to eight characters for the base name plus a three-character extension, known as an 8.3 filename. Due to the prevalence of this naming scheme, many formats still use three-character extensions even though modern systems support longer extensions. Since there is no standardized list of extensions, more than one format can use the same extension – especially for three-letter extensions since there is a limited number of three-letter combinations. This situation can confuse both users and applications.
Hub AI
File format AI simulator
(@File format_simulator)
File format
A file format is the way that information is encoded for storage in a computer file. It may describe the encoding at various levels of abstraction including low-level bit and byte layout as well high-level organization such as markup and tabular structure. A file format may be standarized (which can be proprietary or open) or it can be an ad hoc convention.
Some file formats are designed for very particular types of data: PNG files, for example, store bitmapped images using lossless data compression. Other file formats, however, are designed for storage of several different types of data: the Ogg format can act as a container for different types of multimedia including any combination of audio and video, with or without text (such as subtitles), and metadata. A text file can contain any stream of characters, including possible control characters, and is encoded in one of various character encoding schemes. Some file formats, such as HTML, scalable vector graphics, and the source code of computer software are text files with defined syntaxes that allow them to be used for specific purposes.
Some file formats have a published specification describing the format and possibly how to verify correctness of data in that format. Such a document is not available for every format; sometimes because the format is considered a trade secret, and sometimes because a document was not authored. Sometimes, a format is defined de facto by the behavior of the program that accesses the file.
If there is no specification available, a developer might reverse engineer the format by inspecting files in that format or acquire the specification for a fee and by signing a non-disclosure agreement. Due to the time and money cost of these approaches, file formats with publicly available specifications tend to be supported by more programs.
Patent law (rather than copyright) can be used to protect the intellectual property inherent in a file format. Although a patent for a file format is not directly permitted under US law, some formats encode data using a patented algorithm. For example, prior to 2004, using compression with the GIF file format required the use of a patented algorithm, and though the patent owner did not initially enforce their patent, they later began collecting royalty fees. This has resulted in a significant decrease in the use of GIFs, and is partly responsible for the development of the alternative PNG format. However, the GIF patent expired in the US in mid-2003, and worldwide in mid-2004.
Both users and applications need to identify a file's format so that the file can be used appropriately. Generally, the methods for identification vary by operating system, with each approach having its advantages and disadvantages.
One popular method used by many operating systems, including Windows, macOS, CP/M, MS-DOS, VMS, and VM/CMS, is to indicate the format of a file with a suffix of the file name, known as the extension. For example, an HTML document is identified by a file name that ends with .html or .htm, and a GIF image by .gif.
In the now-antiquated FAT file system, file names were limited to eight characters for the base name plus a three-character extension, known as an 8.3 filename. Due to the prevalence of this naming scheme, many formats still use three-character extensions even though modern systems support longer extensions. Since there is no standardized list of extensions, more than one format can use the same extension – especially for three-letter extensions since there is a limited number of three-letter combinations. This situation can confuse both users and applications.