// writeUncompressedChunk writes an uncompressed chunk to the LZMA2
// stream.
writeUncompressedChunk writes an uncompressed chunk to the LZMA2
stream.
// writeUncompressedChunk writes an uncompressed chunk to the LZMA2 // stream .
func (w *Writer2) writeUncompressedChunk() error {
	u := w.encoder.Compressed()
	if u <= 0 {
		return errors.New("lzma: can't write empty uncompressed chunk")
	}
	if u > maxUncompressed {
		panic("overrun of uncompressed data limit")
	}
	switch w.ctype {
	case cLRND:
		w.ctype = cUD
	default:
		w.ctype = cU
	}
	w.encoder.state = w.start
	header := chunkHeader{
		ctype:        w.ctype,
		uncompressed: uint32(u - 1),
	}
	hdata, err := header.MarshalBinary()
	if err != nil {
		return err
	}
	if _, err = w.w.Write(hdata); err != nil {
		return err
	}
	_, err = w.encoder.dict.CopyN(w.w, int(u))
	return err
}
func ( w * Writer2 ) writeUncompressedChunk ( ) error { u := w . encoder . Compressed ( ) if u <= 0 { return errors . New ( " " ) } if u > maxUncompressed { panic ( " " ) } switch w . ctype { case cLRND : w . ctype = cUD default : w . ctype = cU } w . encoder . state = w . start header := chunkHeader { ctype : w . ctype , uncompressed : uint32 ( u - 1 ) , } hdata , err := header . MarshalBinary ( ) if err != nil { return err } if _ , err = w . w . Write ( hdata ) ; err != nil { return err } _ , err = w . encoder . dict . CopyN ( w . w , int ( u ) ) return err }
writeUncompressedChunk writes an uncompressed chunk to the LZMA2
stream.
writeUncompressedChunk writes an uncompressed chunk to the LZMA2 stream .