Format:HOG (Descent)
| Magic | 44 48 46 ("DHF") |
|---|---|
| Extensions | .hog |
| Endianness | little |
| On this wiki | Facts · Code · Notes · Topics |
Archive of Parallax's Descent and Descent 2 (the Rebirth utilities create and extract it): the 3-byte tag 'DHF' followed by back-to-back records of a 13-byte name, a 4-byte little-endian size and the file bytes, with no directory.
Layout
The format has no header besides the tag and no file count or offsets; a reader walks the file record by record until the end.
| Offset | Size | Field |
|---|---|---|
| 0 | 3 | DHF
|
| 3 | 13 | file name, NUL padded (at most 12 characters plus NUL) |
| 16 | 4 | file size, little-endian |
| 20 | size | file data |
| 20 + size | - | next record (name, size, data) ... until end of file |
A file's data offset is therefore found only by walking the chain: record i starts where record i-1 ended.
How the references handle it
The Rebirth utilities hogcreate and hogextract (d2x-rebirth/utilities) show the layout: hogcreate writes the tag DHF, then for each file a 13-byte zeroed-then-filled name, the size as a 4-byte integer (byte-swapped on big-endian hosts) and the bytes; it refuses names longer than 12 characters. hogextract skips the first 3 bytes without comparing them to DHF and loops while the file position is below the file size.
Unverified
Unverified: Descent 3 uses a different HOG variant (this page covers the Descent 1/2 'DHF' archive only); the dxx-rebirth game reads HOGs through the PhysFS library's HOG handler, which was not read here.
Code & repositories
- https://github.com/dxx-rebirth/dxx-rebirth @
6943b924bea749543ef5729f31a28345e79716d2· license: GPL-3.0-only (declared by the contributor; GitHub's detector did not recognize COPYING.txt)
D1X-Rebirth/D2X-Rebirth source port of Descent 1 and 2: similar/main/piggy.cpp (PIG, HAM, sound files), similar/main/bm.cpp (game tables), d2x-rebirth/utilities/hogcreate.c and hogextract.c (HOG). Distributed under GPLv3 with a special exception for the original Parallax license (COPYING.txt); cite facts only.
Tested on: source read, not run: source read at the cited commit, not run · checked 2026-10-19; last activity 2026-10-11