vdf-rs
vdf-rs copied to clipboard
Add in binary parsing
Currently only text parsing is supported, but there is also a binary format provided for vdf. Since pest doesn't support binary parsing we'll have to pull in some other parsing library as well that supports binary parsing.
This source will probably help to implement binary parsing without other dependencies:
https://github.com/ValvePython/vdf/blob/d76292623e326fb165fe3bdb684832cdf30959d4/vdf/init.py#L316-L422
I recently wrote a basic deserializer for binary VDF: https://github.com/FlashyReese/decky-wine-cellar/blob/application-management/backend/src/vdf_util.rs.
However, this doesn't guarantee a safe serialization back into binary format because we don't store the data type of the value.