// flush32 will flush out, so there are at least 32 bits available for writing.
489007
func (b *bitWriter) flush32() {
	if b.nBits < 32 {
		return
	}
	b.out = append(b.out,
		byte(b.bitContainer),
		byte(b.bitContainer>>8),
		byte(b.bitContainer>>16),
		byte(b.bitContainer>>24))
	b.nBits -= 32
	b.bitContainer >>= 32
}
394827
func (fw *flushWriter) Write(p []byte) (n int, err error) {
	n, err = fw.w.Write(p)
	if fw.f != nil {
		fw.f.Flush()
	}
	return
}
479311
func (ed *eventData) writeInt32(value int32) {
	binary.Write(&ed.buffer, binary.LittleEndian, value)
}
559997
func Int32() (i int32) {
	randomBits(r)
	buf := bytes.NewBuffer(r)
	binary.Read(buf, binary.LittleEndian, &i)
	return i
}
879939
func (w *ByteWriter) WriteFloat32(val float32, offset int) (int, error) {
	return w.WriteVal(val, offset)
}
883042
func (w *ByteWriter) WriteInt32(val int32, offset int) (int, error) {
	return w.WriteVal(val, offset)
}
1310134
func (b *Buffer) Flush() (size int, err error) {
	for _, buf := range b.buffer {
		if size, err = b.write(buf); err != nil {
			return
		}
	}

	b.buffer = b.buffer[:0]
	return
}
671019
func (s *blockWriteStream) flush(force bool) error {
	if err := s.getAckError(); err != nil {
		return err
	}

	for s.buf.Len() > 0 && (force || s.buf.Len() >= outboundPacketSize) {
		packet := s.makePacket()
		s.packets <- packet
		s.offset += int64(len(packet.data))
		s.seqno++

		err := s.writePacket(packet)
		if err != nil {
			return err
		}
	}

	return nil
}
117127
func (e *Encoder) Flush() error {
	_, err := e.w.Write([]byte{'\n'})
	e.w.Flush()
	return err
}
27315
func flush(r io.Reader) (bytes int64, err error) {
	return io.Copy(ioutil.Discard, r)
}
1066383
func WriteInt32(w io.Writer, val int32) (n int, err error) {
	return WriteUint32(w, uint32(val))
}
904689
func (bwa *BatchedWriterAssembly) Flush() {
	if bwa.writer != nil {
		bwa.assembly.SetWriter(bwa.writer)
		bwa.Batch.Flush(bwa.assembly.Write)
	} else {
		bwa.Batch.Flush(bwa.assembly.Flush)
	}
}
346113
func (w *ByteWriter) MustWriteInt32(val int32, offset int) int {
	return w.MustWriteVal(val, offset)
}
631601
func (w *BufferedWriter) Flush() error {
	if w.err == nil {
		w.err = w.bw.Flush()
	}

	return w.err
}
628192
func (bw *BufferedFileWriter) Flush() {
	bw.mu.Lock()
	// could add check if bw.done already
	//  should never happen
	bw.bufWriter.Flush()
	bw.origWriter.f.Sync()
	bw.mu.Unlock()
}
373926
func (w *compressWriter) Flush() {
	if w.encoder != nil {
		w.encoder.Flush()
	}
	if w, ok := w.ResponseWriter.(http.Flusher); ok {
		w.Flush()
	}
}
364109
func (s *FloatEncoder) Flush() {
	if !s.finished {
		// write an end-of-stream record
		s.finished = true
		s.Write(math.NaN())
		s.bw.Flush(bitstream.Zero)
	}
}