optimize char size calculation
Merge pull request #6 from flavioribeiro/master

optimize char size calculation