Home | History | Annotate | Download | only in go

Lines Matching refs:byte

21 // GetByte decodes a little-endian byte from a byte slice.
22 func GetByte(buf []byte) byte {
23 return byte(GetUint8(buf))
26 // GetBool decodes a little-endian bool from a byte slice.
27 func GetBool(buf []byte) bool {
31 // GetUint8 decodes a little-endian uint8 from a byte slice.
32 func GetUint8(buf []byte) (n uint8) {
37 // GetUint16 decodes a little-endian uint16 from a byte slice.
38 func GetUint16(buf []byte) (n uint16) {
44 // GetUint32 decodes a little-endian uint32 from a byte slice.
45 func GetUint32(buf []byte) (n uint32) {
53 // GetUint64 decodes a little-endian uint64 from a byte slice.
54 func GetUint64(buf []byte) (n uint64) {
66 // GetInt8 decodes a little-endian int8 from a byte slice.
67 func GetInt8(buf []byte) (n int8) {
72 // GetInt16 decodes a little-endian int16 from a byte slice.
73 func GetInt16(buf []byte) (n int16) {
79 // GetInt32 decodes a little-endian int32 from a byte slice.
80 func GetInt32(buf []byte) (n int32) {
88 // GetInt64 decodes a little-endian int64 from a byte slice.
89 func GetInt64(buf []byte) (n int64) {
101 // GetFloat32 decodes a little-endian float32 from a byte slice.
102 func GetFloat32(buf []byte) float32 {
107 // GetFloat64 decodes a little-endian float64 from a byte slice.
108 func GetFloat64(buf []byte) float64 {
113 // GetUOffsetT decodes a little-endian UOffsetT from a byte slice.
114 func GetUOffsetT(buf []byte) UOffsetT {
118 // GetSOffsetT decodes a little-endian SOffsetT from a byte slice.
119 func GetSOffsetT(buf []byte) SOffsetT {
123 // GetVOffsetT decodes a little-endian VOffsetT from a byte slice.
124 func GetVOffsetT(buf []byte) VOffsetT {
128 // WriteByte encodes a little-endian uint8 into a byte slice.
129 func WriteByte(buf []byte, n byte) {
133 // WriteBool encodes a little-endian bool into a byte slice.
134 func WriteBool(buf []byte, b bool) {
141 // WriteUint8 encodes a little-endian uint8 into a byte slice.
142 func WriteUint8(buf []byte, n uint8) {
143 buf[0] = byte(n)
146 // WriteUint16 encodes a little-endian uint16 into a byte slice.
147 func WriteUint16(buf []byte, n uint16) {
148 buf[0] = byte(n)
149 buf[1] = byte(n >> 8)
152 // WriteUint32 encodes a little-endian uint32 into a byte slice.
153 func WriteUint32(buf []byte, n uint32) {
154 buf[0] = byte(n)
155 buf[1] = byte(n >> 8)
156 buf[2] = byte(n >> 16)
157 buf[3] = byte(n >> 24)
160 // WriteUint64 encodes a little-endian uint64 into a byte slice.
161 func WriteUint64(buf []byte, n uint64) {
163 buf[i] = byte(n >> (i * 8))
167 // WriteInt8 encodes a little-endian int8 into a byte slice.
168 func WriteInt8(buf []byte, n int8) {
169 buf[0] = byte(n)
172 // WriteInt16 encodes a little-endian int16 into a byte slice.
173 func WriteInt16(buf []byte, n int16) {
174 buf[0] = byte(n)
175 buf[1] = byte(n >> 8)
178 // WriteInt32 encodes a little-endian int32 into a byte slice.
179 func WriteInt32(buf []byte, n int32) {
180 buf[0] = byte(n)
181 buf[1] = byte(n >> 8)
182 buf[2] = byte(n >> 16)
183 buf[3] = byte(n >> 24)
186 // WriteInt64 encodes a little-endian int64 into a byte slice.
187 func WriteInt64(buf []byte, n int64) {
189 buf[i] = byte(n >> (i * 8))
193 // WriteFloat32 encodes a little-endian float32 into a byte slice.
194 func WriteFloat32(buf []byte, n float32) {
198 // WriteFloat64 encodes a little-endian float64 into a byte slice.
199 func WriteFloat64(buf []byte, n float64) {
203 // WriteVOffsetT encodes a little-endian VOffsetT into a byte slice.
204 func WriteVOffsetT(buf []byte, n VOffsetT) {
208 // WriteSOffsetT encodes a little-endian SOffsetT into a byte slice.
209 func WriteSOffsetT(buf []byte, n SOffsetT) {
213 // WriteUOffsetT encodes a little-endian UOffsetT into a byte slice.
214 func WriteUOffsetT(buf []byte, n UOffsetT) {