I fixed performance of operation to large file.
fixed unittest code.
Merge pull request #12 from ikeikeikeike/fix_encode

I fixed performance of operation to large file.