// Make creates a new BitField.
194069
func Make(size uint32) BitField {
	if size == 0 {
		return BitField{}
	}
	return BitField{
		data: make([]byte, (size+8-1)>>3),
		size: size,
	}
}
1257768
func (tsz *TarSz) Create(out io.Writer) error {
	tsz.wrapWriter()
	return tsz.Tar.Create(out)
}
943940
func Make(size int, back, fore color.Color, data []byte) (image.Image, error) {
	if size < minSize {
		return nil, fmt.Errorf("参数size的值(%v)不能小于%v", size, minSize)
	}

	h := md5.New()
	h.Write(data)
	sum := h.Sum(nil)

	// 第一个方块
	index := int(sum[0]+sum[1]+sum[2]+sum[3]) % len(blocks)
	b1 := blocks[index]

	// 第二个方块
	index = int(sum[4]+sum[5]+sum[6]+sum[7]) % len(blocks)
	b2 := blocks[index]

	// 中间方块
	index = int(sum[8]+sum[9]+sum[10]+sum[11]) % len(centerBlocks)
	c := centerBlocks[index]

	// 旋转角度
	angle := int(sum[12]+sum[13]+sum[14]+sum[15]) % 4

	// 画布坐标从0开始，其长度应该是size-1
	p := image.NewPaletted(image.Rect(0, 0, size, size), []color.Color{back, fore})
	drawBlocks(p, size, c, b1, b2, angle)
	return p, nil
}
883602
func (f *DefaultPooledObjectFactory) MakeObject(ctx context.Context) (*PooledObject, error) {
	return f.make(ctx)
}
1174866
func MakeHash(newHash []byte) (Hash, error) {
	nhlen := len(newHash)
	if nhlen != HashSize {
		return Hash{}, fmt.Errorf("invalid hash length of %v, want %v",
			nhlen, HashSize)
	}

	var hash Hash
	copy(hash[:], newHash)

	return hash, nil
}
1366662
func (mounter *Mounter) MakeFile(pathname string) error {
	f, err := os.OpenFile(pathname, os.O_CREATE, os.FileMode(0644))
	defer f.Close()
	if err != nil {
		if !os.IsExist(err) {
			return err
		}
	}
	return nil
}
37320
func MakeHash(s string) string {
	const IEEE = 0xedb88320
	var IEEETable = crc32.MakeTable(IEEE)
	hash := fmt.Sprintf("%x", crc32.Checksum([]byte(s), IEEETable))
	return hash
}
1272899
func (BitCurve *BitCurve) Add(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int) {
	z := new(big.Int).SetInt64(1)
	return BitCurve.affineFromJacobian(BitCurve.addJacobian(x1, y1, z, x2, y2, z))
}
1257273
func (logger *Logger) makeBuf(p []byte) {
	count := strings.Count(string(p), lineSep)
	p = []byte(strings.Replace(string(p), lineSep, "\u2028", count-1))

	logger.buf = logger.buf[:0]
	logger.buf = append(logger.buf, (logger.token + " ")...)
	logger.buf = append(logger.buf, (logger.prefix + " ")...)
	logger.buf = append(logger.buf, p...)

	if !strings.HasSuffix(string(logger.buf), lineSep) {
		logger.buf = append(logger.buf, (lineSep)...)
	}
}
1259026
func (lib *Lib) MakeBuffer(alloc int) (*Buffer, error) {
	s := C.malloc(C.gss_buffer_size)
	if s == nil {
		return nil, ErrMallocFailed
	}
	C.memset(s, 0, C.gss_buffer_size)

	b := &Buffer{
		Lib:            lib,
		C_gss_buffer_t: C.gss_buffer_t(s),
		alloc:          alloc,
	}
	return b, nil
}
891531
func MakeTable(poly uint32) *Table {
	switch poly {
	case IEEE:
		ieeeOnce.Do(ieeeInit)
		return IEEETable
	case Castagnoli:
		castagnoliOnce.Do(castagnoliInit)
		return castagnoliTable
	}
	return simpleMakeTable(poly)
}
654654
func (_class SRClass) Make(sessionID SessionRef, host HostRef, deviceConfig map[string]string, physicalSize int, nameLabel string, nameDescription string, atype string, contentType string, smConfig map[string]string) (_retval string, _err error) {
	_method := "SR.make"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_hostArg, _err := convertHostRefToXen(fmt.Sprintf("%s(%s)", _method, "host"), host)
	if _err != nil {
		return
	}
	_deviceConfigArg, _err := convertStringToStringMapToXen(fmt.Sprintf("%s(%s)", _method, "device_config"), deviceConfig)
	if _err != nil {
		return
	}
	_physicalSizeArg, _err := convertIntToXen(fmt.Sprintf("%s(%s)", _method, "physical_size"), physicalSize)
	if _err != nil {
		return
	}
	_nameLabelArg, _err := convertStringToXen(fmt.Sprintf("%s(%s)", _method, "name_label"), nameLabel)
	if _err != nil {
		return
	}
	_nameDescriptionArg, _err := convertStringToXen(fmt.Sprintf("%s(%s)", _method, "name_description"), nameDescription)
	if _err != nil {
		return
	}
	_atypeArg, _err := convertStringToXen(fmt.Sprintf("%s(%s)", _method, "type"), atype)
	if _err != nil {
		return
	}
	_contentTypeArg, _err := convertStringToXen(fmt.Sprintf("%s(%s)", _method, "content_type"), contentType)
	if _err != nil {
		return
	}
	_smConfigArg, _err := convertStringToStringMapToXen(fmt.Sprintf("%s(%s)", _method, "sm_config"), smConfig)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _hostArg, _deviceConfigArg, _physicalSizeArg, _nameLabelArg, _nameDescriptionArg, _atypeArg, _contentTypeArg, _smConfigArg)
	if _err != nil {
		return
	}
	_retval, _err = convertStringToGo(_method + " -> ", _result.Value)
	return
}
201744
func makeBitsReversedTable(poly uint16) *Table {
	t := &Table{
		reversed: true,
	}
	width := uint16(16)
	for i := uint16(0); i < 256; i++ {
		crc := i << (width - 8)
		for j := 0; j < 8; j++ {
			if crc&(1<<(width-1)) != 0 {
				crc = (crc << 1) ^ poly
			} else {
				crc <<= 1
			}
		}
		t.entries[i] = crc
	}
	return t
}
160705
func (i *Identicon) Make(data []byte) image.Image {
	h := md5.New()
	h.Write(data)
	sum := h.Sum(nil)

	// 第一个方块
	index := int(sum[0]+sum[1]+sum[2]+sum[3]) % len(blocks)
	b1 := blocks[index]

	// 第二个方块
	index = int(sum[4]+sum[5]+sum[6]+sum[7]) % len(blocks)
	b2 := blocks[index]

	// 中间方块
	index = int(sum[8]+sum[9]+sum[10]+sum[11]) % len(centerBlocks)
	c := centerBlocks[index]

	// 旋转角度
	angle := int(sum[12]+sum[13]+sum[14]) % 4

	// 根据最后一个字段，获取前景颜色
	index = int(sum[15]) % len(i.foreColors)

	p := image.NewPaletted(i.rect, []color.Color{i.backColor, i.foreColors[index]})
	drawBlocks(p, i.size, c, b1, b2, angle)
	return p
}
1074570
func (c *Context) MakePair() (a *Socket, b *Socket) {
	var err error
	addr := fmt.Sprintf("inproc://%s-%d", PairPrefix, nextId())
	if a, err = c.Socket(Pair); err != nil {
		goto Error
	}
	if err = a.Bind(addr); err != nil {
		goto Error
	}
	if b, err = c.Socket(Pair); err != nil {
		goto Error
	}
	if err = b.Connect(addr); err != nil {
		goto Error
	}
	return

Error:
	if a != nil {
		a.Close()
	}
	if b != nil {
		b.Close()
	}
	panic(err)
}
743007
func (bl *BitList) AddBits(b int, count byte) {
	for i := int(count) - 1; i >= 0; i-- {
		bl.AddBit(((b >> uint(i)) & 1) == 1)
	}
}
979736
func (bl *BitList) AddByte(b byte) {
	for i := 7; i >= 0; i-- {
		bl.AddBit(((b >> uint(i)) & 1) == 1)
	}
}