// writeHeader writes the header. If the function is called after Close
// the commpressedSize and uncompressedSize fields will be filled.
writeHeader writes the header. If the function is called after Close
the commpressedSize and uncompressedSize fields will be filled.
// writeHeader writes the header . If the function is called after Close // the commpressedSize and uncompressedSize fields will be filled .
func (bw *blockWriter) writeHeader(w io.Writer) error {
	h := blockHeader{
		compressedSize:   -1,
		uncompressedSize: -1,
		filters:          bw.filters,
	}
	if bw.closed {
		h.compressedSize = bw.compressedSize()
		h.uncompressedSize = bw.uncompressedSize()
	}
	data, err := h.MarshalBinary()
	if err != nil {
		return err
	}
	if _, err = w.Write(data); err != nil {
		return err
	}
	bw.headerLen = len(data)
	return nil
}
func ( bw * blockWriter ) writeHeader ( w io . Writer ) error { h := blockHeader { compressedSize : - 1 , uncompressedSize : - 1 , filters : bw . filters , } if bw . closed { h . compressedSize = bw . compressedSize ( ) h . uncompressedSize = bw . uncompressedSize ( ) } data , err := h . MarshalBinary ( ) if err != nil { return err } if _ , err = w . Write ( data ) ; err != nil { return err } bw . headerLen = len ( data ) return nil }
writeHeader writes the header.
writeHeader writes the header .