// Length of a written frame
327187
func (f *StreamDataBlockedFrame) Length(version protocol.VersionNumber) protocol.ByteCount {
	return 1 + utils.VarIntLen(uint64(f.StreamID)) + utils.VarIntLen(uint64(f.DataLimit))
}
795903
func (s *TCP) Write(frame []byte) (n int, err error) {
	s.frames = append(s.frames, frame)
	if len(s.frames) == cap(s.frames) {
		return len(frame), s.Flush()
	}
	return len(frame), nil
}
618882
func (c *PCPClient) Length() int {
	var (
		InstanceLength = Instance1Length
		MetricLength   = Metric1Length
	)

	if c.r.version2 {
		InstanceLength = Instance2Length
		MetricLength = Metric2Length
	}

	return HeaderLength +
		(c.tocCount() * TocLength) +
		(c.r.InstanceCount() * InstanceLength) +
		(c.r.InstanceDomainCount() * InstanceDomainLength) +
		(c.r.MetricCount() * MetricLength) +
		(c.r.ValuesCount() * ValueLength) +
		(c.r.StringCount() * StringLength)
}
1295853
func (m *mapReact) Length() int {
	var l int
	m.ro.RLock()
	l = len(m.ma)
	m.ro.RUnlock()
	return l
}
661320
func (lengthDelimitedFramer) NewFrameWriter(w io.Writer) io.Writer {
	return framer.NewLengthDelimitedFrameWriter(w)
}
431628
func (sr *Stackers) Length() int {
	var l int
	sr.ro.Lock()
	{
		l = len(sr.stacks)
		sr.ro.Unlock()
	}
	return l
}
886270
func (f *AckFrame) Length(version protocol.VersionNumber) protocol.ByteCount {
	largestAcked := f.AckRanges[0].Largest
	numRanges := f.numEncodableAckRanges()

	length := 1 + utils.VarIntLen(uint64(largestAcked)) + utils.VarIntLen(encodeAckDelay(f.DelayTime))

	length += utils.VarIntLen(uint64(numRanges - 1))
	lowestInFirstRange := f.AckRanges[0].Smallest
	length += utils.VarIntLen(uint64(largestAcked - lowestInFirstRange))

	for i := 1; i < numRanges; i++ {
		gap, len := f.encodeAckRange(i)
		length += utils.VarIntLen(gap)
		length += utils.VarIntLen(len)
	}
	return length
}
270511
func (b *Block) Size() common.StorageSize {
	if size := b.size.Load(); size != nil {
		return size.(common.StorageSize)
	}
	c := writeCounter(0)
	rlp.Encode(&c, b)
	b.size.Store(common.StorageSize(c))
	return common.StorageSize(c)
}
1320806
func (b *PCMBuffer) Size() (numFrames int) {
	if b == nil || b.Format == nil {
		return 0
	}
	numChannels := b.Format.NumChannels
	if numChannels == 0 {
		numChannels = 1
	}
	switch b.DataType {
	case Integer:
		numFrames = len(b.Ints) / numChannels
	case Float:
		numFrames = len(b.Floats) / numChannels
	case Byte:
		sampleSize := int((b.Format.BitDepth-1)/8 + 1)
		numFrames = (len(b.Bytes) / sampleSize) / numChannels
	}
	return numFrames
}
930869
func (f *RetireConnectionIDFrame) Length(protocol.VersionNumber) protocol.ByteCount {
	return 1 + utils.VarIntLen(f.SequenceNumber)
}
96957
func goFramebufferSizeCB(window unsafe.Pointer, width, height C.int) {
	w := windows.get((*C.GLFWwindow)(window))
	w.fFramebufferSizeHolder(w, int(width), int(height))
}
384014
func (w *Window) GetFramebufferSize() (width, height int) {
	var wi, h C.int
	C.glfwGetFramebufferSize(w.data, &wi, &h)
	return int(wi), int(h)
}
598975
func (f *Footer) Length() uint64 {
	jBuf, err := json.Marshal(f)
	if err != nil {
		return 0
	}

	footerLen := footerBegLen + len(jBuf) + footerEndLen
	return uint64(footerLen)
}
549699
func (ac *AddressCache) Length() (numAddrs, numTxns, numUTXOs int) {
	ac.mtx.RLock()
	defer ac.mtx.RUnlock()
	return ac.length()
}
1143858
func (kvmsg *Kvmsg) Size() int {
	if kvmsg.present[frame_BODY] {
		return len(kvmsg.frame[frame_BODY])
	}
	return 0
}
498280
func (bez *T) Length(t float64) float64 {
	return Length(&bez.P0, &bez.P1, &bez.P2, &bez.P3, t)
}
213027
func (lengthDelimitedFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser {
	return framer.NewLengthDelimitedFrameReader(r)
}