private void ssHeapSort (int Td, int PA, int sa, int size) {

		final int[] SA = this.SA;
		final byte[] T = this.T;

		int i, m;
		int t;

		m = size;
		if ((size % 2) == 0) {
			m--;
			if ((T[Td + SA[PA + SA[sa + (m / 2)]]] & 0xff) < (T[Td + SA[PA + SA[sa + m]]] & 0xff)) {
				swapElements (SA, sa + m, SA, sa + (m / 2));
			}
		}

		for (i = m / 2 - 1; 0 <= i; --i) {
			ssFixdown (Td, PA, sa, i, m);
		}

		if ((size % 2) == 0) {
			swapElements (SA, sa, SA, sa + m);
			ssFixdown (Td, PA, sa, 0, m);
		}

		for (i = m - 1; 0 < i; --i) {
			t = SA[sa];
			SA[sa] = SA[sa + i];
			ssFixdown (Td, PA, sa, 0, i);
			SA[sa + i] = t;
		}

	}