made BrrBlockDecoder a bit more general-purpose