change decoder api slightly
a nice stream design at last, including a nasty stream hack