public int bwt() {

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

		final int[] bucketA = new int[BZip2DivSufSort.BUCKET_A_SIZE];
		final int[] bucketB = new int[BZip2DivSufSort.BUCKET_B_SIZE];

		if (n == 0) {
			return 0;
		} else if (n == 1) {
			SA[0] = T[0];
			return 0;
		}

		int m = sortTypeBstar (bucketA, bucketB);
		if (0 < m) {
			return constructBWT (bucketA, bucketB);
		}

		return 0;

	}