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 .