reafactoring for API consideration, speed has improved however, something is wrong with the dictionary building, compression suffers do to this reason.