in reply to Parsing Netbios and DNS Names

# Don't ask me why - it just works this way

This is called 'first-level encoding', and is explained in RFC 1001 (and rather simpler here). This may help in your quest...personally, I'd probably go for a split'n'map solution, but I bet there's a clever 'unpack' just waiting to be written. :)

Cheers
Ben.