Update der_encoder.h

refined der_encode_to_buffer