code: func (b *Block) readFrom(r io.Reader) error {
  	crc := crc32.NewIEEE()
  	er := errorReader{r: io.TeeReader(r, crc)}
  	var buf [4]byte
  	io.ReadFull(&er, buf[:2])
  	b.method = buf[0]
  	b.typ = buf[1]
  	b.contentID = er.itf8()
  	b.compressedSize = er.itf8()
  	b.rawSize = er.itf8()
  	if b.method == rawMethod && b.compressedSize != b.rawSize {
  		return fmt.Errorf("cram: compressed (%d) != raw (%d) size for raw method", b.compressedSize, b.rawSize)
  	}
  	// The spec says T[] is {itf8, element...}.
  	// This is not true for byte[] according to
  	// the EOF block.
  	b.blockData = make([]byte, b.compressedSize)
  	_, err := io.ReadFull(&er, b.blockData)
  	if err != nil {
  		return err
  	}
  	sum := crc.Sum32()
  	_, err = io.ReadFull(&er, buf[:])
  	if err != nil {
  		return err
  	}
  	b.crc32 = binary.LittleEndian.Uint32(buf[:])
  	if b.crc32 != sum {
  		return fmt.Errorf("cram: block crc32 mismatch got:0x%08x want:0x%08x", sum, b.crc32)
  	}
  	return nil
  }
docs: // readFrom fills a Block from the given io.Reader checking that the
  // CRC32 for the block is correct.