-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Internal] Binary Encoding: Adds Support for User String Encoding #5036
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good!
Microsoft.Azure.Cosmos/src/Json/IReadOnlyJsonStringDictionary.cs
Outdated
Show resolved
Hide resolved
return false; | ||
} | ||
|
||
return this.checksum == other.checksum; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checksum is generated by hashing each incoming string with the previous hash as the seed. If the checksums are the same the dictionaries will definitely contain the same strings in the same order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | ||
bool TryGetString(int index, out UtfAllString value); | ||
|
||
bool TryGetIndex(Utf8Span value, out int index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a matching TryGetIndex function in the BE
Description
Adds support for reading and writing user string encoded binary data in JsonReader, JsonWriter, and JsonNavigator.
Note: This is being introduced to support an internal scenario. For now, user string encoded data will NOT be sent over the wire to the client.
Type of change