public static int getEncodedSizeWithoutArrayData(Ptg[] ptgs) {int result = 0;for (Ptg ptg : ptgs) {if (ptg instanceof ArrayPtg) {result += ArrayPtg.PLAIN_TOKEN_SIZE;} else {result += ptg.getSize();}}return result;}

public static int GetEncodedSizeWithoutArrayData(Ptg[] ptgs){int result = 0;for (int i = 0; i < ptgs.Length; i++){Ptg ptg = ptgs[i];if (ptg is ArrayPtg){result += ArrayPtg.PLAIN_TOKEN_SIZE;}else{result += ptg.Size;}}return result;}
