Working on the "engine" side of a game for GBCompo21.
The standard way of doing music for GB seems to use a tracker that produces data for a "driver" that runs on the GameBoy and interprets it and writes to the sound registers. But a lot of these drivers are huge balls of code and I didn't want to use any libraries on the GB side so I considered whether I can do what Id Tech MS-DOS games do and simply take a big ol' dump of per-frame sound register values and compress it. This is vastly simpler than the driver approach and the code is very small and fast. The compressed data size is comparable to the data for the driver approach, only slightly larger (depending on the ring buffer size).

The way it works is I have a rudimentary LZ compressor that is aware of the decompressor implementation on the GB side. The GB decompresses a frame's worth of register values each frame into a 2KB ring buffer. The buffer is used for the LZ decompression's back references. Since it only decompresses at max 40 or so bytes per frame it takes very little CPU time. A complicated example song exported from Deflemask tracker weighs in at around 62.7KB and is compressed down to 14KB. My compressor is very quick'n'dirty so it's also likely possible to compress it further.

The video is of the BGB debugger showing the ring buffer in memory.