CdZnTe and CdTe detector performance can be significantly improved with low-noise electronics. The main sources of noise that broaden the spectrum peaks in a room-temperature system are incomplete charge collection and leakage current of the detector, and the feedback resistor of the preamplifier. The detector leakage current can be reduced by cooling the detector to about -30 degrees C. Normally, at these temperatures the leakage current of a small detector crystal drops to the picoampere level which enables the use of low-noise, pulsed-optical feedback preamplifiers instead of noisier resistive feedback preamplifiers. Also, because of lower leakage currents, it is possible to use higher bias voltages at low temperatures which is important for more efficient charge collection. This reduces spectrum background and peak tailing. Applying rise time discrimination circuitry to the linear amplifier reduces the tailing effect even further, especially at higher energies. By employing all these methods a number of Cd0.9Zn0.1Te, Cd0.8Zn0.2Te and PIN-structure CdTe detector crystals were tested at temperatures between -20 degrees C and -40 degrees C, and at best FWHM energy resolutions of 240 eV at the 5.9-keV line of Fe-55, 600 eV at the 59.5-keV line of Am-241, and 4.4 keV (0.7 %) at the 662-keV line of Cs-137 were obtained. These energy resolutions measured at room temperature with conventional methods are typically about 4 to 10 times poorer.