adding streamcodec serialization.