NOVELTY - The apparatus has network of gas conduits and valves (35-38) that allows selective fluid communication between reversible gas compressor/expander, other reversible gas compressor/expander, compressed gas storage unit, and counter-flow heat exchanger. Reversible gas compressor/expander operates as compressor to flow compressed gas through counter-flow heat exchanger to other reversible gas compressor/expander operating as expander, such that input thermal energy is converted into different form of energy when network of gas conduits and valves is in heat engine mode.    USE - Apparatus for compressing and expanding of gas, for compressed-air energy storage system.    ADVANTAGE - The linkage is actuated to operate the dedicated compressor to compress gas received from the dedicated expander, and flow the compressed gas to back to the expander to allow to operate after the energy conversion, so that the gas is cooled by the thermal sink prior to or during the compression. Hence thermodynamic losses attributable to non-isothermal compression of the gas can be reduced. The heat can be transferred from the compressor-expander to the heat sink, so that the air being compressed in the compressor-expander can experience the reduced change in temperature. Hence the energy loss can be reduced. The efficiency of the energy storage system can be improved by reducing the distribution losses.    DETAILED DESCRIPTION - The apparatus has reversible gas compressor/expanders that operate as compressors to flow compressed gas to compressed gas storage units such that input energy is converted into pneumatic form when network of gas conduits and valves is in energy storage mode. Reversible gas compressor/expanders operate as expanders to receive compressed gas from compressed gas storage units, such that input pneumatic energy is converted into other form of energy when network of gas conduits and valves is in energy deliver mode.    DESCRIPTION OF DRAWING(S) - The drawing shows a schematic view of the compressed air energy storage system.    Pipe (10)    Cylinder device (21)    Cylinder chamber (22)    Piston (23)    Valves (35-38)