[GSoC] API for various compression codecs

First draft of API.
@trustin and @normanmaurer please review it.
Great idea! So we can use it only for Zlib codecs.