/// <summary> /// Creates a binary value or ascii value metadata entry from data received from the native layer. /// We trust C core to give us well-formed data, so we don't perform any checks or defensive copying. /// </summary> internal static Entry CreateUnsafe(string key, byte[] valueBytes) { if (HasBinaryHeaderSuffix(key)) { return(new Entry(key, null, valueBytes)); } return(new Entry(key, MarshalUtils.GetStringASCII(valueBytes), null)); }