compsample - adaptive-delta sample compressor
==============================================

What it does
  Compresses a 15000 Hz 8-bit WAV and writes the two raw blocks Janitor 15
  incbin's (audio.s):
    <out.tab> = the 16 delta tables
    <out.dat> = the big-endian packed body

    compsample <in.wav> <out.tab> <out.dat> [<roundtrip.wav>] [--bits 2|4]

  Each 64-bit packet is a 4-bit table index + N delta codes, with one of 16
  tables chosen per packet.  --bits sets the code width, hence the ratio:
    4 (default)  16-entry tables, 15 samples/packet   ~2:1
    2             4-entry tables, 30 samples/packet    ~4:1
  The novel parts: the tables are fit to the actual signal (k-means over the
  per-packet optimal tables) instead of fixed, and the accumulator wraps with
  no clamp so the m68k replay can be a bare byte-add loop.  A roundtrip WAV is
  written only if <roundtrip.wav> is given, to A/B by ear.

Why it's needed
  The replay decodes these packets straight from audio.tab / audio.dat every
  VBL; compsample produces exactly those two files for the root Makefile.

Build
  make            (needs only a C++23 compiler)
