Write writes the profile as a gzip-compressed marshaled protobuf.
(w io.Writer)
| 343 | |
| 344 | // Write writes the profile as a gzip-compressed marshaled protobuf. |
| 345 | func (p *Profile) Write(w io.Writer) error { |
| 346 | zw := gzip.NewWriter(w) |
| 347 | defer zw.Close() |
| 348 | _, err := zw.Write(serialize(p)) |
| 349 | return err |
| 350 | } |
| 351 | |
| 352 | // WriteUncompressed writes the profile as a marshaled protobuf. |
| 353 | func (p *Profile) WriteUncompressed(w io.Writer) error { |