localcc / gvas

GVAS file format parsing library for rust
MIT License
18 stars 4 forks source link

Flatten ByteProperty serde representation #74

Closed scottanderson closed 5 months ago

scottanderson commented 5 months ago

This is part of a proposed fix for #66.

Several games use arrays of ByteProperty to store various binary data streams. The current serde format is essentially Vec<Property<ByteProperty<u8>>>, which is inefficient to represent when the array gets very large. This change attempts to coerce this type of data in to a Vec<u8>, and falls back to Vec<Property> in the event of an error.