save encoding result