code: func (b *Block) expandBlockdata() ([]byte, error) {
  	switch b.method {
  	default:
  		panic(fmt.Sprintf("cram: unknown method: %v", b.method))
  	case rawMethod:
  		return b.blockData, nil
  	case gzipMethod:
  		gz, err := gzip.NewReader(bytes.NewReader(b.blockData))
  		if err != nil {
  			return nil, err
  		}
  		return ioutil.ReadAll(gz)
  	case bzip2Method:
  		return ioutil.ReadAll(bzip2.NewReader(bytes.NewReader(b.blockData)))
  	case lzmaMethod:
  		lz, err := lzma.NewReader(bytes.NewReader(b.blockData))
  		if err != nil {
  			return nil, err
  		}
  		return ioutil.ReadAll(lz)
  	case ransMethod:
  		// Unimplemented.
  		// BUG(kortschak): The rANS method is not implemented.
  		// Data blocks compressed with rANS will be returned
  		// compressed and an "unimplemented" error will be
  		// returned.
  		return b.blockData, errors.New("unimplemented")
  	}
  }
docs: // expandBlockdata decompresses the block's compressed data.