Top 5.8% dependent packages on proxy.golang.org
Top 4.7% dependent repos on proxy.golang.org
proxy.golang.org : github.com/mixcode/binarystruct
Package binarystruct is an automatic type-converting binary data marshaller/unmarshaller for go structs. Binary data formats are usually tightly packed to save spaces. Such data often require type conversions to be used in the Go language context. This package handles type conversions between Go data types and binary types of struct fields according to their tags. See the struct below for an example. Each field in this struct is tagged with "binary" tags. The three integer fields are tagged as 1-byte, 2-bytes, and 4-bytes long, and the Header string is tagged as a 4-byte sequence. Marshall and Unmarshal function reads the tag and converts each field to the specified binary format. A complex example An example of slices and arrays. Pointers and interfaces are automatically allocated if possible.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/mixcode/binarystruct
License: BSD-3-Clause
Latest release: over 2 years ago
First release: about 4 years ago
Namespace: github.com/mixcode
Dependent packages: 1
Dependent repositories: 1
Last synced: 15 days ago