165. The appeal may be taken by either the prosecuting party or the offender. If it is taken by the offender, he must at the same time deposit $300 in the hands of the clerk of appeals. If the appeal is dismissed, such deposit shall be confiscated and forfeited to the Crown, and the offender shall be liable, in addition, to the penalties and costs to which he has been condemned.