code: func BlobFromReader(ref blob.Ref, r io.Reader) (*Blob, error) {
  	if !ref.Valid() {
  		return nil, errors.New("schema.BlobFromReader: invalid blobref")
  	}
  	var buf bytes.Buffer
  	tee := io.TeeReader(r, &buf)
  	ss, err := parseSuperset(tee)
  	if err != nil {
  		return nil, err
  	}
  	var wb [16]byte
  	afterObj := 0
  	for {
  		n, err := tee.Read(wb[:])
  		afterObj += n
  		for i := 0; i < n; i++ {
  			if !isASCIIWhite(wb[i]) {
  				return nil, fmt.Errorf("invalid bytes after JSON schema blob in %v", ref)
  			}
  		}
  		if afterObj > MaxSchemaBlobSize {
  			break
  		}
  		if err == io.EOF {
  			break
  		}
  		if err != nil {
  			return nil, err
  		}
  	}
  	json := buf.String()
  	if len(json) > MaxSchemaBlobSize {
  		return nil, fmt.Errorf("schema: metadata blob %v is over expected limit; size=%d", ref, len(json))
  	}
  	return &Blob{ref, json, ss}, nil
  }
docs: // BlobFromReader returns a new Blob from the provided Reader r,
  // which should be the body of the provided blobref.
  // Note: the hash checksum is not verified.