improved bwt encoder performance