public static String applyZip(String in1, int idx1, String in2, int idx2, OperationCombiner func)
	{
		OperationSerializer.OpIterator iter1 = new OpIterator(in1, idx1);
		OperationSerializer.OpIterator iter2 = new OpIterator(in2, idx2);
		SmartOpAssembler assem = new SmartOpAssembler();

		Operation op1 = new Operation();
		Operation op2 = new Operation();
		Operation opOut = new Operation();

		while (op1.opcode!=0 || iter1.hasNext() || op2.opcode!=0 || iter2.hasNext())
		{
			if ((op1.opcode==0) && iter1.hasNext()) op1 = iter1.next();
			if ((op2.opcode==0) && iter2.hasNext()) op2 = iter2.next();
			func.combine(op1, op2, opOut);

			if (opOut.opcode != 0)
			{
				//print(opOut.toSource());
				assem.append(opOut);
				opOut.opcode = 0;
			}
		}
		assem.endDocument();
		return assem.toString();
	};