TokTok / c-toxcore

The future of online communications.
https://tox.chat
GNU General Public License v3.0
2.3k stars 289 forks source link

Refactor tox savedata code to use bin_pack/bin_unpack. #2235

Open iphydf opened 2 years ago

iphydf commented 2 years ago

Not using msgpack, but using the new binary packing/unpacking modules to make the savedata code more robust and less complex.

emdee-is commented 2 years ago

How about going the opposite way and save the profiles in JSON or YAML so that they can be read and edited? There are lot's of libraries that handle the details, and we would be able to see what's going on in there.

From what I'm seeing using https://git.macaw.me/emdee/tox_profile to parse the profiles there is some nasty stuff:

These would have jumped out at anyone reading them in a text format and I can't imagine that the time saving of a binary format will matter.