Fix problem with to big uncompressed buffer and fix codestyle