New helper function for mp.hex_view().