A heat exchanger and a method for drying a humid medium. In the heat
exchanger an internal cross-over passage, allowing a humid medium to
double back on itself in a zone delimited by a barrier, is provided. In a
first step the heat exchanger cools itself and in a final step the heat
exchanger heats itself. Separation areas allow condensation and
collection of water within the heat exchanger. The heat exchanger and
method enable drying of compressed air within one and the same heat
exchanger package.