id Tech / Quake .PAK format
===========================

The canonical, open pak archive used by Quake, Quake II, Half-Life and
PhysicsFS-based engines. All integers are little-endian.

Header (12 bytes)
  offset 0x00  char[4]   signature  "PACK"
  offset 0x04  uint32    directory offset (bytes from start of file)
  offset 0x08  uint32    directory length (bytes) == entry_count * 64

Directory (at `directory offset`, `directory length` bytes)
  a sequence of 64-byte entries, one per file:
    offset +0x00  char[56]  file name, forward-slash paths, NUL-padded
                            (may or may not be prefixed with "/")
    offset +0x38  uint32    file data offset (bytes from start of file)
    offset +0x3C  uint32    file data length (bytes)

File data
  each file's raw, uncompressed bytes, stored back-to-back between the
  header and the directory. Best practice (and what this library does) is
  to place the directory at the END of the file so growing it never shifts
  file offsets — same idea as ZIP's central directory.

Limits
  - file names: 56 bytes incl. NUL terminator (so 55 usable chars)
  - offsets & lengths: unsigned 32-bit -> ~4 GB max archive
  - no built-in compression (that is the trade for O(1) random access
    and dead-simple mounting)

Reference sources
  - MakePAK (builder)   https://github.com/Luiji/MakePAK   (see its FORMAT doc)
  - pakextract (reader) https://github.com/yquake2/pakextract
  - Quake Wiki .pak page / Kaitai `quake_pak` formal spec
  The Quake .PAK format itself is a public, documented file format; this
  description is a clean re-statement of it.
