blob: 9d66ef27d6e0394de7f7d7981df9654082762629 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
//go:build purego || !amd64
// +build purego !amd64
package bswap
import "encoding/binary"
func swap64(b []byte) {
for i := 0; i < len(b); i += 8 {
u := binary.BigEndian.Uint64(b[i:])
binary.LittleEndian.PutUint64(b[i:], u)
}
}
|