A RegExp should be fine, depending on how many times you have to do this.
I'm not sure if \0 will match your zeros, but give an expression like this a try:
s/\0+$//;
which will nuke all zeros at the end of a string
twerq
update -- looks like someone beat me to the punch :)