| // Copyright 2011 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // Compressed represents a compressed OpenPGP packet. The decompressed contents |
| // will contain more OpenPGP packets. See RFC 4880, section 5.6. |
| func (c *Compressed) parse(r io.Reader) os.Error { |
| _, err := readFull(r, buf[:]) |
| c.Body = flate.NewReader(r) |
| c.Body, err = zlib.NewReader(r) |
| err = error.UnsupportedError("unknown compression algorithm: " + strconv.Itoa(int(buf[0]))) |