Generating burrows-wheeler-transform and a suffix array of a DNA sequence with less memory Also posted on biostars

After indexing

bwa index -a bwtsw reference.fa 


I got files. like .bwt file and .sa file. The naive way of generating these file is:
  


Create all rotations of T
Sort the rotations lexicographically  
Concatenate the last character of each rotation to form 
 BWT(T)


I used this naive way in my algorithm. The problem is it took too much memory.

My question is: is there an effective memory way to generate .bwt file and .sa file ?

Any help will be appreciated.
No, there is no way to decompress .bwt or .sa files, because they are not compressed. After indexing you'll get these files, which some programs (bwa) use. They should be in the same folder as your reference fasta file. What are you trying to do with these files? To get proper help here, please explain why you need these files, and show how you made the files.