Updates for stream decoding support using a more C++-like structure. Need to debug a crash and end-of-stream being reported too soon.