  We systematically analyze the prompt emission and the early afterglow data of
a sample of 31 GRBs detected by {\em Swift} before September 2005, and estimate
the GRB radiative efficiency. BAT's narrow band inhibits a precise
determination of the GRB spectral parameters, and we have developed a method to
estimate these parameters with the hardness ratio information. The shallow
decay component commonly existing in early X-ray afterglows, if interpreted as
continuous energy injection in the external shock, suggests that the GRB
efficiency previously derived from the late-time X-ray data were not reliable.
We calculate two radiative efficiencies using the afterglow kinetic energy E_K
derived at the putative deceleration time t_{dec}) and at the break time (t_b)
when the energy injection phase ends, respectively. At t_b XRFs appear to be
less efficient than normal GRBs. However, when we analyze the data at t_{dec}
XRFs are found to be as efficient as GRBs. Short GRBs have similar radiative
efficiencies to long GRBs despite of their different progenitors. Twenty-two
bursts in the sample are identified to have the afterglow cooling frequency
below the X-ray band. Assuming \epsilon_e = 0.1, we find \eta_\gamma(t_b)
usually <10% and \eta_\gamma (t_{dec}) varying from a few percents to > 90%.
Nine GRBs in the sample have the afterglow cooling frequency above the X-ray
band for a very long time. This suggests a very small \epsilon_B and/or a very
low ambient density n.
