The property key order serialized was ["2", "foo", "", "bar", "xyz", "!", "~"] which did not match the order keys were encountered during encoding (and subsequently the order in which repeated values were stored which corresponded to a key order of ["foo", "", "bar", "2", "xyz", "!", "~"]).
I believe this can be fixed by ensuring keyArr in encode.js is generated via sorting "keys" by value.
At least on my machine, geobuf failed to properly encode the following geojson:
The property key order serialized was
["2", "foo", "", "bar", "xyz", "!", "~"]
which did not match the order keys were encountered during encoding (and subsequently the order in which repeated values were stored which corresponded to a key order of["foo", "", "bar", "2", "xyz", "!", "~"]
).I believe this can be fixed by ensuring keyArr in encode.js is generated via sorting "keys" by value.