- fixed resource leak
- use power of two size
- restore stream settings
Merge pull request #114 from aschnell/master

- fixed minor issues found by analysis tool