Implement header-user-data decoding

Alas, not exposed to Perl because the current semantics of how we pass
output SV *'s in *sometimes* is weird to emulate for decoding either one
or the other or both...