Flash compression& optimizationg tool