fix buf nullpointerexception , add boolean filed to compare
Merge pull request #10 from DmytroGryshchenko/master

fix buf nullpointerexception , add boolean filed to compare