Added dec_finish to Decoder that tells the machine that the stream has ended, as well as a corresponding query operation dec_finishing.