High-gain free-electron lasers (FELs) in the ultraviolet and x-ray regime put stringent demands on the peak current, transverse emittance, and energy spread of the driving electron beam. At the soft x-ray FEL FLASH, a transverse deflecting microwave structure (TDS) has been installed to determine these parameters for the longitudinally compressed bunches, which are characterized by a narrow leading peak of high charge density and a long tail. The rapidly varying electromagnetic field in the TDS deflects the electrons vertically and transforms the time profile into a streak on an observation screen. The bunch current profile was measured single shot with an unprecedented resolution of 27 fs under FEL operating conditions. A precise single-shot measurement of the energy distribution along a bunch was accomplished by using the TDS in combination with an energy spectrometer. Variation of quadrupole strengths allowed for a determination of the horizontal emittance as a function of the longitudinal position within a bunch, the so-called slice emittance. In the bunch tail, a normalized slice emittance of about $2\text{ }\text{ }\ensuremath{\mu}\mathrm{m}$ was found, in agreement with expectations. In the leading spike, however, surprisingly large emittance values were observed, in apparent contradiction with the low emittance deduced from the measured FEL gain. By applying three-dimensional phase space tomography, we were able to show that the bunch head contains a central core of low emittance and high local current density, which is presumably the lasing part of the bunch.