An ideal gas is in contact with a heat reservoir so that it remains at a constant temperature of 100 K. The gas is compressed from a volume of 28 L to a volume of 14 L. During the process the mechanical device pushing the piston to compress the gas is found to expend 4 kJ of energy. What is the magnitude of the heat flow between the heat reservoir and the gas and in what direction does the heat flow occur?