Abstract: An integral gas compressor and internal combustion engine. The compressor is built by converting a portion of an internal combustion engine to a compressor by removing the original engine head and valve train and replacing these with a compressor head assembly. The compressor head assembly includes compressor valves and valve chairs for holding the compressor valves in place. An inlet manifold encloses all of the valve chairs and places all of the inlet flow paths through the valve chairs in communication with a gas source. The head defines a discharge passageway therethrough which is in communication with a discharge opening. A venting system is provided to vent any gas that might build up in the compressor due to leakage past the piston rings and to transfer this vented gas to a fuel inlet of the engine, as desired. An oil viscosity sensing system is provided for sensing the oil viscosity in the crankcase and shutting down the engine when the viscosity drops below a predetermined level.