Decode a Uint8Array into a number or hexadecimal string.