// WriteBigFloat to the writer
768271
func (w *Writer) WriteBigFloat(bf *big.Float) {
	w.writeByte(TagDouble)
	var buf [64]byte
	w.write(bf.Append(buf[:0], 'g', -1))
	w.writeByte(TagSemicolon)
}
388419
func (b *ByteBuf) WriteByte(v byte) error {
	b.Expansion(1)
	b.buf[b.writerIndex] = v
	b.writerIndex++
	return nil
}
116477
func pushBigInt(n *big.Int, ctx *duktape.Context) {
	ctx.GetGlobalString("bigInt")
	ctx.PushString(n.String())
	ctx.Call(1)
}
1201974
func (self *XXHash) Write(data []byte) (nn int, err error) {
	if data == nil {
		return 0, errors.New("Data cannot be nil.")
	}
	l := len(data)
	if l > 1<<30 {
		return 0, errors.New("Cannot add more than 1 Gigabytes at once.")
	}
	self.feed(data)
	return len(data), nil
}
931023
func (buf *Buffer) WriteByte(b byte) error {
	buf.bytes = append(buf.bytes, b)
	return nil
}
1113358
func (b *ByteBuf) WriteByteBuf(from *ByteBuf) error {
	size := from.Readable()
	b.Expansion(size)
	copy(b.buf[b.writerIndex:b.writerIndex+size], from.buf[from.readerIndex:from.writerIndex])
	b.writerIndex += size
	from.readerIndex = from.writerIndex
	return nil
}
1184162
func (c *CountingWriter) Write(buf []byte) (int, error) {
	amount, err := c.Writer.Write(buf)
	c.Count += int64(amount)
	return amount, err
}
751184
func (f *ReclaimQuotaFile) Write(ctx context.Context, req *fuse.WriteRequest,
	resp *fuse.WriteResponse) (err error) {
	f.folder.fs.log.CDebugf(ctx, "ReclaimQuotaFile Write")
	defer func() { err = f.folder.processError(ctx, libkbfs.WriteMode, err) }()
	if len(req.Data) == 0 {
		return nil
	}
	err = libkbfs.ForceQuotaReclamationForTesting(
		f.folder.fs.config, f.folder.getFolderBranch())
	if err != nil {
		return err
	}
	resp.Size = len(req.Data)
	return nil
}
1013290
func (mw *Writer) Write(buf []byte) (int, error) {
	if mw.err != nil {
		return 0, mw.err
	}

	var wrCnt int
	for _, b := range buf {
		zeros, ones := numBits(b)

		// If possible, avoid flushing to maintain high efficiency.
		if ensured := mw.bufCnt < EnsureRawBytes; ensured {
			goto skipEncode
		}
		if huffLen, _ := mw.computeHuffLen(mw.buf0s+zeros, mw.buf1s+ones); huffLen > 0 {
			goto skipEncode
		}

		mw.err = mw.encodeBlock(FinalNil)
		if mw.err != nil {
			break
		}

	skipEncode:
		mw.buf0s += zeros
		mw.buf1s += ones
		mw.buf[mw.bufCnt] = b
		mw.bufCnt++
		wrCnt++
	}

	mw.InputOffset += int64(wrCnt)
	return wrCnt, mw.err
}
669839
func writeFull(w io.Writer, buf []byte) (n int, err error) {
	var i int
	for n < len(buf) {
		i, err = w.Write(buf[n:])
		n += i
		if err != nil {
			break
		}
	}
	return
}
679247
func (a *Attribute) getBigFloat() *big.Float {
	f := new(big.Float)
	f.SetPrec(floatPrecision)
	if a.Int != nil {
		f.SetInt64(*a.Int)
	} else if a.Float != nil {
		f.SetFloat64(*a.Float)
	} else {
		return nil
	}

	// Get the unit
	u := a.getTypedUnit()

	// If there is no unit just return the float
	if u == nil {
		return f
	}

	// Convert to the base unit
	multiplier := new(big.Float)
	multiplier.SetPrec(floatPrecision)
	multiplier.SetInt64(u.Multiplier)
	if u.InverseMultiplier {
		base := big.NewFloat(1.0)
		base.SetPrec(floatPrecision)
		multiplier = multiplier.Quo(base, multiplier)
	}

	f.Mul(f, multiplier)
	return f
}
268894
func (cfe *CoordinatesFlatElement) Write(w io.Writer) error {
	return write(w, "", "  ", cfe)
}
532866
func (c *CyclePDB) Write(towrite []boltcycle.KvPair) (err error) {
	atomic.AddInt64(&c.stats.TotalWriteCount, int64(len(towrite)))

	return c.blobs.latest().Update(func(tx *bolt.Tx) error {
		bucket := tx.Bucket(c.bucketTimesIn)
		if bucket == nil {
			return errorUnableToFindRootBucket
		}

		for i := 0; err == nil && i < len(towrite); i++ {
			p := towrite[i]
			err = bucket.Put(p.Key, p.Value)
		}
		return err
	})
}
1248380
func (w *minifyWriter) Write(b []byte) (int, error) {
	return w.pw.Write(b)
}
1200229
func (s *Writer) Write(b []byte) (int, error) {
	if s.limiter == nil {
		return s.w.Write(b)
	}

	n, err := s.w.Write(b)
	if err != nil {
		return n, err
	}

	if err := s.limiter.WaitN(s.ctx, n); err != nil {
		return n, err
	}
	return n, err
}
673082
func (se *SizingEncoder) WriteString(value string) {
	se.WriteInt16(int16(len(value)))
	se.size += len(value)
}
230154
func (w *Writer) writeBlock() {
	_, w.err = w.w.Write(w.buf[w.written:])
	w.i = 0
	w.j = headerSize
	w.written = 0
}