Unsafe zero-copy slice casts for Go
Convenience functions for casting raw bytes to typed arrays without copying.
Usage:
b := []byte{1, 2, 3, 4}
v := unsafeslice.Uint32SliceFromByteSlice(b)GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up| Failed to load latest commit information. | |||
|
|
LICENSE | ||
|
|
README.md | ||
|
|
unsafeslice.go | ||
|
|
unsafeslice_test.go | ||
Convenience functions for casting raw bytes to typed arrays without copying.
Usage:
b := []byte{1, 2, 3, 4}
v := unsafeslice.Uint32SliceFromByteSlice(b)