While there are various different kinds of compensation the government may have to pay, there is no universal compensation, not everywhere does so. As for the prosecutor, they have immunity from damn near anything they do in their capacity as prosecutor.