Every clerk of any court or other officer who shall willfully permit any deposition, or the transcript of any testimony, returned by a grand jury and filed with such clerk or officer, to be inspected by any person except the court, the deputies or assistants of such clerk, and the prosecuting attorney and his or her deputies, until after the arrest of the defendant, shall be guilty of a misdemeanor.