// Write writes data to the countingWriter.
Write writes data to the countingWriter.
// Write writes data to the countingWriter .
func (cw *countingWriter) Write(p []byte) (n int, err error) {
	n, err = cw.w.Write(p)
	cw.n += int64(n)
	if err == nil && cw.n < 0 {
		return n, errors.New("xz: counter overflow")
	}
	return
}
func ( cw * countingWriter ) Write ( p [ ] byte ) ( n int , err error ) { n , err = cw . w . Write ( p ) cw . n += int64 ( n ) if err == nil && cw . n < 0 { return n , errors . New ( " " ) } return }
Write writes data to the countingWriter.
Write writes data to the countingWriter .