func UnmarshalLen(dst *uint32, elemSize int, buf []byte, rem int) ([]byte, int, error) {
	var l uint32
	buf, rem, err := UnmarshalU32(&l, buf, rem)
	if err != nil {
		return buf, rem, err
	}
	if elemSize < 1 {
		elemSize = 1
	}
	var c uint64 = uint64(l) * uint64(elemSize)
	if c/uint64(elemSize) != uint64(l) {
		return buf, rem, ErrLengthOverflow
	}
	if uint64(rem) < c {
		return buf, rem, ErrUnexpectedEndOfBuffer
	}
	*dst = l
	return buf, rem, nil
}
UnmarshalLen unmarshals a slice length, checking that the total space
required for the slice will not exceed rem.
package surge
func MarshalLen(l uint32, buf []byte, rem int) ([]byte, int, error) {
	return MarshalU32(l, buf, rem)
}