proxy.golang.org : github.com/bradleypeabody/binenc
Easily implement binary encodings and JSON representation in Go using struct tags and marshaling. The binenc package aims to provide: A struct tag format capable of expressing common idioms in binary formats, such as bit flags, endianness, length+value pairs and more. An interface to override binenc's behavior should it fall short. A JSON encoder and decoder providing a human readable representation of the binary data, for debugging and/or storage. TODO - need to show a type, registering it, encoding, parsing. (maybe JSON but not essential, could just mention name of encoder) Format: Struct tags for binenc have values that are separated by commas and can be a single value or a name-value pair separated by an equal sign. Multiple values are allowed. Examples: Endianness: You can also set the default endianess for cases where not tagged by setting DEFAULT_BYTE_ORDER (defaults to big endian). Constants: Headers, footers or other demarcation bytes which have a constant value can be specified with the "const" option as a hex encoded string prefixed with "0x".
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/bradleypeabody/binenc
License: MIT
Latest release: over 7 years ago
First release: over 7 years ago
Namespace: github.com/bradleypeabody
Stars: 1 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 26 days ago