Optimize return values of DER encoding functions.