allow optional stream encoding