Expose encodingToInsertOutput and add offset to insertOutput.