// decodeVMLDrawingReader provides a function to get the pointer to the
// structure after deserialization of xl/drawings/vmlDrawing%d.xml.
964885
func (f *File) decodeVMLDrawingReader(path string) *decodeVmlDrawing {
	if f.DecodeVMLDrawing[path] == nil {
		c, ok := f.XLSX[path]
		if ok {
			d := decodeVmlDrawing{}
			_ = xml.Unmarshal(namespaceStrictToTransitional(c), &d)
			f.DecodeVMLDrawing[path] = &d
		}
	}
	return f.DecodeVMLDrawing[path]
}
344581
func dmlFormatter(buf *sqlparser.TrackedBuffer, node sqlparser.SQLNode) {
	switch node := node.(type) {
	case sqlparser.TableName:
		node.Name.Format(buf)
		return
	}
	node.Format(buf)
}
18463
func NewDecoder(r io.Reader) *Decoder {
	decoder := &Decoder{
		r: bufio.NewReader(r),
	}

	return decoder
}
360098
func UnmarshalBuilder(b io.Reader) (*Builder, error) {
	var nodeType lowring.Node
	j := &builderJSON{}
	jsonDecoder := json.NewDecoder(b)
	if err := jsonDecoder.Decode(j); err != nil {
		return nil, err
	}
	b = io.MultiReader(jsonDecoder.Buffered(), b)
	// These byte reads are to get past any trailing whitespace, newlines, etc.
	// the JSON encoder may or may not have written. When marshalling we
	// preface the raw ring data with a 0 byte.
	b0 := []byte{0}
	for {
		if n, err := b.Read(b0); err != nil {
			return nil, err
		} else if n == 0 {
			b0[0] = 1
		}
		if b0[0] == 0 {
			break
		}
	}
	if j.MarshalVersion != 0 {
		return nil, fmt.Errorf("unable to interpret data with MarshalVersion %d", j.MarshalVersion)
	}
	if j.NodeType != int(unsafe.Sizeof(nodeType))*8 {
		return nil, fmt.Errorf("builder data does not match compiled builder format. NodeType is %d bits in the data and %d bits compiled.", j.NodeType, int(unsafe.Sizeof(nodeType))*8)
	}
	rv := &Builder{
		ring:     &lowring.Ring{},
		nodes:    make([]*BuilderNode, len(j.Nodes)),
		groups:   make([]*BuilderGroup, len(j.Groups)),
		randIntn: rand.New(rand.NewSource(0)).Intn,
	}
	rv.ring.NodeToCapacity = make([]int, len(j.Nodes))
	rv.ring.NodeToGroup = make([]int, len(j.Nodes))
	rv.ring.GroupToGroup = make([]int, len(j.Groups))
	rv.ring.MaxPartitionCount = j.MaxPartitionCount
	rv.ring.Rebalanced = time.Unix(0, j.Rebalanced)
	rv.ring.ReassignmentWait = uint16(j.ReassignmentWait)
	rv.ring.MaxReplicaReassignableCount = int8(j.MaxReplicaReassignableCount)
	for i, jn := range j.Nodes {
		rv.nodes[i] = &BuilderNode{builder: rv, index: i, info: jn.Info}
		rv.ring.NodeToCapacity[i] = jn.Capacity
		rv.ring.NodeToGroup[i] = jn.Group
	}
	for i, jg := range j.Groups {
		rv.groups[i] = &BuilderGroup{builder: rv, index: i, info: jg.Info}
		rv.ring.GroupToGroup[i] = jg.Parent
	}
	rv.ring.ReplicaToPartitionToNode = make([][]lowring.Node, j.ReplicaCount)
	for replica := 0; replica < j.ReplicaCount; replica++ {
		rv.ring.ReplicaToPartitionToNode[replica] = make([]lowring.Node, j.PartitionCount)
		if err := binary.Read(b, binary.LittleEndian, rv.ring.ReplicaToPartitionToNode[replica]); err != nil {
			return nil, err
		}
	}
	rv.ring.ReplicaToPartitionToWait = make([][]uint16, j.ReplicaCount)
	for replica := 0; replica < j.ReplicaCount; replica++ {
		rv.ring.ReplicaToPartitionToWait[replica] = make([]uint16, j.PartitionCount)
		if err := binary.Read(b, binary.LittleEndian, rv.ring.ReplicaToPartitionToWait[replica]); err != nil {
			return nil, err
		}
	}
	return rv, nil
}
146178
func xmlDecoder(body io.Reader, v interface{}) error {
	d := xml.NewDecoder(body)
	return d.Decode(v)
}
1032313
func NewDecoder(name string) Decoder {
	cs := GetCharset(name)
	if cs == nil {
		return nil
	}
	return cs.NewDecoder()
}
1070257
func NewDecoder(r io.Reader) *Decoder {
	return &Decoder{
		called:   0,
		cursor:   0,
		keysDone: 0,
		err:      nil,
		r:        r,
		data:     make([]byte, 512),
		length:   0,
		isPooled: 0,
	}
}
1213421
func NewDecoder(r io.Reader) *Decoder {
	return &Decoder{Decoder: *json.NewDecoder(r)}
}
1037288
func NewDecoder(r io.Reader) *Decoder {
	return &Decoder{r, defaultDelimiter, defaultEscape, false, false}
}
401658
func NewStreamFileBuilder(writer io.Writer) *StreamFileBuilder {
	return &StreamFileBuilder{
		zipWriter:          zip.NewWriter(writer),
		xlsxFile:           NewFile(),
		cellTypeToStyleIds: make(map[CellType]int),
		maxStyleId:         initMaxStyleId,
	}
}
951847
func XMLRender(status int, indent bool, data interface{}, prefix []byte) *XML {
	return &XML{
		Indent: indent,
		Prefix: prefix,
		Data:   data,
		Head: &Head{
			Status:  status,
			Content: ContentXML,
		},
	}
}
659920
func NewDecoder(r io.Reader, format Format) Decoder {
	switch format {
	case FmtProtoDelim:
		return &protoDecoder{r: r}
	}
	return &textDecoder{r: r}
}
738009
func (d *Decoder) decodeScalefactorSelectionInformation2() error {
	for sb := 0; sb < 32; sb++ {
		for ch := 0; ch < d.nChannels; ch++ {
			if d.allocation[ch][sb] != 0 {
				scfsi, err := d.stream.readBits(2)
				if err != nil {
					return err
				}
				d.scfsi2[ch][sb] = scfsi
			}
		}
	}

	return nil
}
1255247
func NewDecoder(r io.Reader) (*Decoder, error) {
	s := &source{
		reader: r,
	}
	d := &Decoder{
		source: s,
		length: invalidLength,
	}

	if err := s.skipTags(); err != nil {
		return nil, err
	}
	// TODO: Is readFrame here really needed?
	if err := d.readFrame(); err != nil {
		return nil, err
	}
	d.sampleRate = d.frame.SamplingFrequency()

	if err := d.ensureFrameStartsAndLength(); err != nil {
		return nil, err
	}

	return d, nil
}
660098
func (n *NodeDevice) GetXMLDesc(flags uint32) (string, error) {
	var err C.virError
	result := C.virNodeDeviceGetXMLDescWrapper(n.ptr, C.uint(flags), &err)
	if result == nil {
		return "", makeError(&err)
	}
	xml := C.GoString(result)
	C.free(unsafe.Pointer(result))
	return xml, nil
}
963787
func (v *StorageVol) GetXMLDesc(flags uint32) (string, error) {
	var err C.virError
	result := C.virStorageVolGetXMLDescWrapper(v.ptr, C.uint(flags), &err)
	if result == nil {
		return "", makeError(&err)
	}
	xml := C.GoString(result)
	C.free(unsafe.Pointer(result))
	return xml, nil
}
325947
func NewDecoder(opts ...func(*Decoder)) *Decoder {
	d := &Decoder{
		MarshalOptions: MarshalOptions{
			SupportJSONTags: true,
		},
	}
	for _, o := range opts {
		o(d)
	}

	return d
}