mina decoder and encoder