func (bs *ByteStream) GetString() string {
	len := bs.GetUInt32()
	x := bs.buf[bs.cur : bs.cur+len]
	bs.cur += len
	return string(x)
}
GetString returns string from ByteStream
package util
import (
	"encoding/binary"
	"unsafe"
)
const (
	uint16Size = 2
	uint32Size = 4
	uint64Size = 8
)
var currentEndianess = binary.LittleEndian
func GetByteOrder() binary.ByteOrder {
	var bo binary.ByteOrder
	var x uint32 = 0x01020304
	switch *(*byte)(unsafe.Pointer(&x)) {
	case 0x01:
	case 0x04:
	}
	return bo
}
type ByteStream struct {
	buf []byte
	cur uint32
}
func (bs *ByteStream) Bytes() []byte {
	return bs.buf
}
func (bs *ByteStream) Size() int {
	return len(bs.buf)
}
func (bs *ByteStream) appendBytes(buf []byte) {
	bs.buf = append(bs.buf, buf...)
	bs.cur += uint32(len(buf))
}
func (bs *ByteStream) PutUInt16(x uint16) {
	b := make([]byte, uint16Size)
	currentEndianess.PutUint16(b, x)
	bs.appendBytes(b)
}
func (bs *ByteStream) PutUInt32(x uint32) {
	b := make([]byte, uint32Size)
	currentEndianess.PutUint32(b, x)
	bs.appendBytes(b)
}
func (bs *ByteStream) PutUInt64(x uint64) {
	b := make([]byte, uint64Size)
	currentEndianess.PutUint64(b, x)
	bs.appendBytes(b)
}
func (bs *ByteStream) PutString(x string) {
	bs.PutUInt32(uint32(len(x)))
	bs.appendBytes([]byte(x))
}
func (bs *ByteStream) PutBytes(x []byte) {
	bs.PutUInt32(uint32(len(x)))
	bs.appendBytes(x)
}
func (bs *ByteStream) GetUInt16() uint16 {
	x := bs.buf[bs.cur : bs.cur+uint16Size]
	y := currentEndianess.Uint16(x)
	bs.cur += uint16Size
	return y
}
func (bs *ByteStream) GetUInt32() uint32 {
	x := bs.buf[bs.cur : bs.cur+4]
	y := currentEndianess.Uint32(x)
	bs.cur += uint32Size
	return y
}
func (bs *ByteStream) GetUInt64() uint64 {
	x := bs.buf[bs.cur : bs.cur+uint64Size]
	y := currentEndianess.Uint64(x)
	bs.cur += uint64Size
	return y
}