func ToUInt32(v []byte) (uint32, error) {
	primitivePacket, _, _, err := DecodePrimitivePacket(v)
	if err != nil {
		return 0, err
	}
	value, err := primitivePacket.ToUInt32()
	if err != nil {
		return 0, nil
	}
	return value, nil
}
ToUInt32 decode bytes to uint32
package y3
import (
	"fmt"
	"github.com/yomorun/y3-codec-golang/internal/utils"
)
func ToObject(v []byte, output interface{}) error {
	_, err := newStructDecoder(output).Decode(v)  
	return err
}
func ToInt32(v []byte) (int32, error) {
	primitivePacket, _, _, err := DecodePrimitivePacket(v)
	if err != nil {
		return 0, err
	}
	value, err := primitivePacket.ToInt32()
	if err != nil {
		return 0, nil
	}
	return value, nil
}
func ToInt32Slice(v []byte) ([]int32, error) {
	packet, _, err := DecodeNodePacket(v)
	if err != nil {
		return nil, err
	}
	if !packet.IsSlice() {
		return nil, fmt.Errorf("v not a slice: %v", utils.FormatBytes(v))
	}
	result := make([]int32, 0)
	for _, p := range packet.PrimitivePackets {
		v, _ := p.ToInt32()
		result = append(result, v)
	}
	return result, nil
}