snappy version 3 - work in progress

Complete simplified rewrite of snappy.
Hi, thanks for the comment. In general, I'd love if you took a look at the code and see if there's something missing in there (I'm guessing that there's stuff that can be improved).

About `delete input;`, I think that it makes sense to do it here since I know that I'm not going to be using the data anymore - so there's really no reason to do it later (in the destructor). But maybe you're a bit better at C++ and there are other reasons to do it in the destructor?