internal/

directory
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2026 License: Apache-2.0

README

internal

Implementation packages for go-stormlib. Everything in this tree is private (Go's internal/ rule) — only the in-repo pkg/storm API and the parity tooling under tools/ may import these packages. External users should depend on pkg/storm instead.

Layout

internal/
├── archive/      MPQ archive read/write/create/compact/patch logic.
│                 Composes mpq + compress codecs. See ./archive/README.md.
├── compress/     Pure-Go ports of Blizzard MPQ codecs (PKWARE explode,
│                 Huffman, ADPCM). See ./compress/README.md.
├── mpq/          On-disk header / hash / block / HET / BET parsing,
│                 file-key derivation, table fuzzing. See ./mpq/README.md.
└── naming/       UTF-8 ↔ filename helpers (StormLib SMemUtf8 contract).
                  See ./naming/README.md.

Dependency graph (within internal/)

naming      (no internal deps)
compress/*  (no internal deps)
mpq         (no internal deps)
archive     -> mpq, compress/{pkware, huffman, adpcm}

pkg/storm is the only first-party consumer of internal/archive and internal/mpq; internal/naming is re-exported by pkg/storm for filename helpers.

Conventions

  • Packages are named after the closest StormLib source file or domain concept they port (e.g. mpq/filekey.goSBaseCommon.cpp DecryptFileKey).
  • Behavior deltas vs StormLib are documented in the per-package README and in docs/compatibility.md.
  • Tests prefer deterministic in-memory fixtures. Where parity with a real binary matters, the assertion lives under tools/parity instead of in the unit-test layer here.

Directories

Path Synopsis
Package archive implements the mid-level MPQ archive engine: open, read, write, create, compact, and patch operations.
Package archive implements the mid-level MPQ archive engine: open, read, write, create, compact, and patch operations.
compress
adpcm
Package adpcm implements decompression of Blizzard's ADPCM-compressed WAVE audio used inside MPQ archives.
Package adpcm implements decompression of Blizzard's ADPCM-compressed WAVE audio used inside MPQ archives.
huffman
Package huffman implements Blizzard's adaptive Huffman codec used by MPQ archives.
Package huffman implements Blizzard's adaptive Huffman codec used by MPQ archives.
pkware
Package pkware implements the PKWARE Data Compression Library "explode" (decompression) algorithm used by classic Blizzard MPQ archives.
Package pkware implements the PKWARE Data Compression Library "explode" (decompression) algorithm used by classic Blizzard MPQ archives.
Package mpq implements the on-disk MPQ format: header detection, hash/block tables, HET/BET secondary tables, and file-key derivation.
Package mpq implements the on-disk MPQ format: header detection, hash/block tables, HET/BET secondary tables, and file-key derivation.
Package naming implements StormLib UTF-8 filename conversion (src/SMemUtf8.cpp, narrow TCHAR = UTF-8).
Package naming implements StormLib UTF-8 filename conversion (src/SMemUtf8.cpp, narrow TCHAR = UTF-8).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL