func (zw *Writer) Write(p []byte) (int, error) {
	pLen := len(p)
	if pLen == 0 {
		return 0, nil
	}

	for {
		n := copy(zw.inBufGo[zw.inBuf.size:cstreamInBufSize], p)
		zw.inBuf.size += C.size_t(n)
		p = p[n:]
		if len(p) == 0 {
			// Fast path - just copy the data to input buffer.
			return pLen, nil
		}
		if err := zw.flushInBuf(); err != nil {
			return 0, err
		}
	}
}
// Write writes p to zw.
//
// Write doesn't flush the compressed data to the underlying writer
// due to performance reasons.
// Call Flush or Close when the compressed data must propagate
// to the underlying writer.
Write writes p to zw.

Write doesn't flush the compressed data to the underlying writer
due to performance reasons.
Call Flush or Close when the compressed data must propagate
to the underlying writer.
// Write writes p to zw . // // Write doesn ' t flush the compressed data to the underlying writer // due to performance reasons . // Call Flush or Close when the compressed data must propagate // to the underlying writer .
func (zw *Writer) Write(p []byte) (int, error) {
	pLen := len(p)
	if pLen == 0 {
		return 0, nil
	}
	for {
		n := copy(zw.inBufGo[zw.inBuf.size:cstreamInBufSize], p)
		zw.inBuf.size += C.size_t(n)
		p = p[n:]
		if len(p) == 0 {
			return pLen, nil
		}
		if err := zw.flushInBuf(); err != nil {
			return 0, err
		}
	}
}
func ( zw * Writer ) Write ( p [ ] byte ) ( int , error ) { pLen := len ( p ) if pLen == 0 { return 0 , nil } for { n := copy ( zw . inBufGo [ zw . inBuf . size : cstreamInBufSize ] , p ) zw . inBuf . size += C . size_t ( n ) p = p [ n : ] if len ( p ) == 0 { return pLen , nil } if err := zw . flushInBuf ( ) ; err != nil { return 0 , err } } }
Write writes p to zw.
Write writes p to zw .
// Fast path - just copy the data to input buffer.