func isNil(v interface{}) (rv reflect.Value, isnil bool) {
	var ui = (*unsafeIntf)(unsafe.Pointer(&v))
	if ui.word == nil {
		isnil = true
		return
	}
	rv = rv4i(v)  
	tk := rv.Kind()
	isnil = (tk == reflect.Interface || tk == reflect.Slice) && *(*unsafe.Pointer)(ui.word) == nil
	return
}
// isNilRef says whether the interface is a nil reference or not.
//
// A reference here is a pointer-sized reference i.e. map, ptr, chan, func, unsafepointer.
// It is optional to extend this to also check if slices or interfaces are nil also.
//
// NOTE: There is no global way of checking if an interface is nil.
// For true references (map, ptr, func, chan), you can just look
// at the word of the interface.
// However, for slices, you have to dereference
// the word, and get a pointer to the 3-word interface value.
func isNilRef(v interface{}) (rv reflect.Value, isnil bool) {
isnil = ((*unsafeIntf)(unsafe.Pointer(&v))).word == nil
return
}
package codec
import (
	"reflect"
	"sync/atomic"
	"time"
	"unsafe"
)
const safeMode = false
const (
	unsafeFlagIndir    = 1 << 7
	unsafeFlagAddr     = 1 << 8
	unsafeFlagKindMask = (1 << 5) - 1  
)
type unsafeString struct {
	Data unsafe.Pointer
	Len  int
}
type unsafeSlice struct {
	Data unsafe.Pointer
	Len  int
	Cap  int
}
type unsafeIntf struct {
	typ  unsafe.Pointer
	word unsafe.Pointer
}
type unsafeReflectValue struct {
	typ  unsafe.Pointer
	ptr  unsafe.Pointer
	flag uintptr
}
func stringView(v []byte) string {
	if len(v) == 0 {
		return ""
	}
	bx := (*unsafeSlice)(unsafe.Pointer(&v))
	return *(*string)(unsafe.Pointer(&unsafeString{bx.Data, bx.Len}))
}
func bytesView(v string) []byte {
	if len(v) == 0 {
		return zeroByteSlice
	}
	sx := (*unsafeString)(unsafe.Pointer(&v))
	return *(*[]byte)(unsafe.Pointer(&unsafeSlice{sx.Data, sx.Len, sx.Len}))
}