Why tar bundles files into one stream

Magnetic tape is read in sequence, so storing a directory as a loose collection of separate files was awkward. The tar format solved a practical problem: it writes files one after another into a single stream, with a small header before each file describing details such as its name and size. A program restoring the archive reads those headers to know where each file begins and ends.

That layout made tar useful for moving groups of files to tape. It also works with ordinary files and pipes, so the format outlasted the hardware that inspired it.

An archive is not necessarily compressed

Tar gathers files; it does not, by itself, shrink them. Compression is a separate step that may be applied to the resulting archive. That is why extensions such as `.tar.gz` indicate a tar archive compressed with gzip, while `.tar` alone does not imply compression.

The distinction matters when opening or creating an archive: tar preserves the bundle’s file-by-file structure, while a compression tool reduces the size of the whole stream. The old tape-oriented design still shapes a familiar modern workflow—one file can carry an entire directory tree, ready to unpack elsewhere.