Effect algebras were introduced as an abstract algebraic model for Hilbert space effects representing quantum mechanical measurements. We study additional structures on an effect algebraEthat enable us to define spectrality and spectral resolutions for elements ofEakin to those of self-adjoint operators. These structures, called compression bases, are special families of maps onE, analogous to the set of compressions on operator algebras, order unit spaces or unital abelian groups. Elements of a compression base are in one-to-one correspondence with certain elements ofE, called projections. An effect algebra is called spectral if it has a distinguished compression base with two special properties: the projection cover property (i.e., for every elementainEthere is a smallest projection majorizinga), and the so-called b-comparability property, which is an analogue of general comparability in operator algebras or unital abelian groups. It is shown that in a spectral archimedean effect algebraE, everya∈Eadmits a unique rational spectral resolution and its properties are studied. If in additionEpossesses a separating set of states, then every elementa∈Eis determined by its spectral resolution. It is also proved that for some types of interval effect algebras (with RDP, archimedean divisible), spectrality ofEis equivalent to spectrality of its universal group and the corresponding rational spectral resolutions are the same. In particular, for convex archimedean effect algebras, spectral resolutions inEare in agreement with spectral resolutions in the corresponding order unit space.