fixes #2
add tests for buffer deflate