Revert "fix: need to use BigEndian to encode little?"
This reverts commit 936450f9e6
.
This commit is contained in:
parent
936450f9e6
commit
c95a953ca2
|
@ -4,7 +4,7 @@ import "encoding/binary"
|
|||
|
||||
func EncodeEndian(value uint64, length int) []byte {
|
||||
byteSlice := make([]byte, length)
|
||||
binary.BigEndian.PutUint64(byteSlice, value)
|
||||
binary.LittleEndian.PutUint64(byteSlice, value)
|
||||
return byteSlice
|
||||
}
|
||||
|
||||
|
@ -12,5 +12,5 @@ func DecodeEndian(byteSlice []byte) uint64 {
|
|||
buffer := make([]byte, 8)
|
||||
copy(buffer, byteSlice)
|
||||
|
||||
return binary.BigEndian.Uint64(buffer)
|
||||
return binary.LittleEndian.Uint64(buffer)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue