Format Atlas

File format basics

Concepts worth knowing before choosing a file format.

Character encodingCharacter encoding maps text to bytes. If a CSV or TXT file opens with garbled characters, check the encoding expected by both the writer and reader, including UTF-8 and any byte-order mark.Container vs codecA container packages media streams, while a codec encodes audio or video inside it. MP4 or MKV alone does not tell you whether a device supports the internal codec.File compressionCompression reduces storage or transfer size. An archive such as ZIP can bundle files; a media codec may compress the content itself. Check compatibility and extraction needs.File extensionsAn extension such as .jpg or .pdf is a filename hint, not proof of the file's contents. Inspect the actual format before changing an extension or trusting a download.File formatsA file format defines how data is represented and interpreted. Choose one by the recipient's software, editing needs, fidelity and long-term access, not by extension alone.Lossless and lossy compressionLossless compression can restore the original data; lossy compression discards information to reduce size. Keep an appropriate source file when future editing matters.MIME typesA MIME type identifies the kind of content, often as type/subtype such as image/jpeg. It helps browsers and services handle files, but should be checked against the actual content.Raster vs vector imagesRaster images store pixels; vector images describe shapes. Photographs usually suit raster formats, while logos and diagrams often benefit from vectors that scale cleanly.Image transparencyTransparency lets the background show through parts of an image. Check whether the format and destination preserve an alpha channel; JPEG does not provide ordinary transparency.Numeric precision and conversionLarge integers and decimal fractions may change when a receiving program parses them into a limited-precision number type.Metadata, sidecars and external dependenciesMetadata describes content or settings. Distinguish a separate sidecar from external data needed to load a file, and check where each item is stored.What checksums can and cannot verifyA hash is calculated from file bytes. Compare with a trusted expected value using the same algorithm, separately from content inspection and sender verification.