A writ of arrest may be executed by the sheriff of any county in the state or by his deputy. Such officers have the same powers and authority, in relation to arrest under a writ of arrest, as are by law conferred upon them in executing a warrant of arrest.