private static CBORObject EncodingFromBytes(byte[] b) { try { using (var s = new MemoryStream(b)) { return BEncoding.Read(s); } } catch (IOException ex) { throw new CBORException(String.Empty, ex); } }