The .deb format is the Debian binary package file format. The format has changed since Debian 0.93 and the new format is being phased in.
The old format is described here. Please see deb(5) for details of the new format.
The first line is the format version number padded to 8 digits, and is 0.939000 for all old-format archives.
The second line is a decimal string (without leading zeroes) giving the length of the first gzipped tarfile.
Each of these lines is terminated with a single newline character.
The first tarfile contains the control information (see the dpkg Programmer's manual) as a series of ordinary files. The file control must be present, and contains the core control information. The files in the control tarfile may optionally be in a DEBIAN subdirectory in some very old archives - in this case the DEBIAN subdirectory will be in the control tarfile too, and the control tarfile will have only files in that directory. Optionally the control tarfile may contain an entry for `.', that is, the current directory.
The second gzipped tarfile is the filesystem archive, containing pathnames relative to the root directory of the system to be installed on. The pathnames do not have leading slashes.