This should be faster than opening the encoder several times. /Tomas