refactoring around codec process in stream
stream encoding process
removed stream#setencoding, added stream#setcodec
stream#setcodec takes nil
corrected