Machinery and apparatus for filtering or purifying gases