1
1
mirror of https://github.com/wader/fq.git synced 2024-12-25 06:12:30 +03:00
fq/pkg/bitio/reversebytes.go
Mattias Wadman 1b32b42f93 decode: Major decode API refactor
Generate more code
More generic and comfortable API
Improve and Update format decoder to new API
Add some more format tests
2021-11-15 21:12:07 +01:00

10 lines
149 B
Go

package bitio
func ReverseBytes(bs []byte) []byte {
l := len(bs)
for i := 0; i < l/2; i++ {
bs[i], bs[l-i-1] = bs[l-i-1], bs[i]
}
return bs
}