vdf-rs icon indicating copy to clipboard operation
vdf-rs copied to clipboard

Add in binary parsing

Open CosmicHorrorDev opened this issue 4 years ago • 2 comments

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.

CosmicHorrorDev avatar Mar 28 '21 06:03 CosmicHorrorDev

This source will probably help to implement binary parsing without other dependencies:

https://github.com/ValvePython/vdf/blob/d76292623e326fb165fe3bdb684832cdf30959d4/vdf/init.py#L316-L422

murlakatamenka avatar Jan 12 '23 15:01 murlakatamenka

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.

FlashyReese avatar Nov 26 '23 06:11 FlashyReese