stakwork / sphinx-rs

Rust crates for Sphinx Chat
0 stars 0 forks source link

swift/kotlin serialization of VLS state #21

Closed Evanfeenstra closed 3 weeks ago

Evanfeenstra commented 11 months ago

We are trying to see if MessagePack is the best option for serializing state between swift/kotlin and Rust. The state object can get quite large, and MessagePack will be like 10x more efficient than JSON for this.

@tomastiminskas Can you test deserializing these bytes using MessagePack in swift and kotlin?

[147, 146, 164, 97, 97, 97, 97, 146, 15, 147, 204, 255, 204, 255, 204, 255, 146, 164, 98, 98, 98, 98, 146, 15, 147, 204, 255, 204, 255, 204, 255, 146, 164, 99, 99, 99, 99, 146, 15, 147, 204, 255, 204, 255, 204, 255]

Here it is as a hex string if that is easier:

9392a461616161920f93ccffccffccff92a462626262920f93ccffccffccff92a463636363920f93ccffccffccff
Evanfeenstra commented 11 months ago

@tomastiminskas here is a different version, can you check it too?

[147, 146, 164, 97, 97, 97, 97, 146, 15, 196, 3, 255, 255, 255, 146, 164, 98, 98, 98, 98, 146, 15, 196, 3, 255, 255, 255, 146, 164, 99, 99, 99, 99, 146, 15, 196, 3, 255, 255, 255]

or

9392a461616161920fc403ffffff92a462626262920fc403ffffff92a463636363920fc403ffffff