// newBlockWriter creates a new block writer.

newBlockWriter creates a new block writer.
// newBlockWriter creates a new block writer .
func (c *WriterConfig) newBlockWriter(xz io.Writer, hash hash.Hash) (bw *blockWriter, err error) {
	bw = &blockWriter{
		cxz:       countingWriter{w: xz},
		blockSize: c.BlockSize,
		filters:   c.filters(),
		hash:      hash,
	}
	bw.w, err = c.newFilterWriteCloser(&bw.cxz, bw.filters)
	if err != nil {
		return nil, err
	}
	bw.mw = io.MultiWriter(bw.w, bw.hash)
	return bw, nil
}
func ( c * WriterConfig ) newBlockWriter ( xz io . Writer , hash hash . Hash ) ( bw * blockWriter , err error ) { bw = & blockWriter { cxz : countingWriter { w : xz } , blockSize : c . BlockSize , filters : c . filters ( ) , hash : hash , } bw . w , err = c . newFilterWriteCloser ( & bw . cxz , bw . filters ) if err != nil { return nil , err } bw . mw = io . MultiWriter ( bw . w , bw . hash ) return bw , nil }
newBlockWriter creates a new block writer.
newBlockWriter creates a new block writer .