git.fractalqb.de/fractalqb/vamp

Package vamp implements the Vampire binary data serialization format for Go. While Vampire does not provide zero-copy characteristics it gives you "direct access" to values i.e., you can navigate any path down into nested structures without parsing too many other parts that come before the value you are looking for. This feature makes any value directly accessible – “perviam” in Latin. Just because “Vampire” sounds much cooler the format is called Vampire in the end. But vamp is the package name to Go for because its shorter and still associated with vampires. When reading and writing data, Vamp supports type promotion between certain types to facilitate the preservation of backwards compatibility. Type promotion between integers is supported if a source type can be stored in a target type without loss. E.g. uint16 can be promoted to int32 but no signed integer type can be promoted to any unsigned integer type. float32 will be promoted to `float64` For the machine-dependent integers int and uint, it depends on the current value whether it can be read from or written to a Vampire integer. If the current value is within the range of the target, the read or write is successful. Otherwise, it results in a runtime error. By default as int64 <-> Unix time with millis.


License
AGPL-3.0
Install
go get git.fractalqb.de/fractalqb/vamp