you don't really need to store it in a array. Why not simply read character and send it one by one. if character is zero skip 1 adress.

How does it sounds to you?