private static int UpdateComparer(
ZipUpdate zx,
ZipUpdate zy) {
int result;
if (zx==null) {
if (zy==null) {
result=0;
} else {
result=-1;
}
} else if (zy==null) {
result=1;
} else {
int xCmdValue=((zx.Command==UpdateCommand.Copy)||(zx.Command==UpdateCommand.Modify))?0:1;
int yCmdValue=((zy.Command==UpdateCommand.Copy)||(zy.Command==UpdateCommand.Modify))?0:1;
result=xCmdValue-yCmdValue;
if (result==0) {
long offsetDiff=zx.Entry.Offset-zy.Entry.Offset;
if (offsetDiff<0) {
result=-1;
} else if (offsetDiff==0) {
result=0;
} else {
result=1;
}
}
}
return result;
}