Fixed output size and removed unneeded loop
Fixed output size and removed unneeded loop

Summary: In Zlib_Compress and BZip2_Compress the calculation for size was slightly off when using compression_foramt_version 2 (which includes the decompressed size in the output).  Also there were unnecessary loops around the deflate/BZ2_bzCompress calls.  In Zlib_Compress there was also a possible exit from the function after calling deflateInit2 that didn't call deflateEnd.

Test Plan: Standard tests

Reviewers: sdong, IslamAbdelRahman, igor

Reviewed By: igor

Subscribers: sdong, IslamAbdelRahman, andrewkr, dhruba

Differential Revision: https://reviews.facebook.net/D60537

vmx/rocksdb,hobinyoon/rocksdb,ryneli/rocksdb,wat-ze-hex/rocksdb,Andymic/rocksdb,Andymic/rocksdb,ryneli/rocksdb,SunguckLee/RocksDB,wenduo/rocksdb,OverlordQ/rocksdb,norton/rocksdb,SunguckLee/RocksDB,SunguckLee/RocksDB,wenduo/rocksdb,bbiao/rocksdb,norton/rocksdb,bbiao/rocksdb,vmx/rocksdb,facebook/rocksdb,facebook/rocksdb,tsheasha/rocksdb,wat-ze-hex/rocksdb,facebook/rocksdb,ryneli/rocksdb,tsheasha/rocksdb,wenduo/rocksdb,OverlordQ/rocksdb,Andymic/rocksdb,vmx/rocksdb,wat-ze-hex/rocksdb,hobinyoon/rocksdb,OverlordQ/rocksdb,tsheasha/rocksdb,facebook/rocksdb,ryneli/rocksdb,ryneli/rocksdb,ryneli/rocksdb,OverlordQ/rocksdb,norton/rocksdb,hobinyoon/rocksdb,facebook/rocksdb,SunguckLee/RocksDB,Andymic/rocksdb,jalexanderqed/rocksdb,bbiao/rocksdb,tsheasha/rocksdb,facebook/rocksdb,hobinyoon/rocksdb,norton/rocksdb,SunguckLee/RocksDB,jalexanderqed/rocksdb,jalexanderqed/rocksdb,ryneli/rocksdb,tsheasha/rocksdb,bbiao/rocksdb,norton/rocksdb,SunguckLee/RocksDB,tsheasha/rocksdb,bbiao/rocksdb,hobinyoon/rocksdb,norton/rocksdb,facebook/rocksdb,Andymic/rocksdb,hobinyoon/rocksdb,OverlordQ/rocksdb,Andymic/rocksdb,wat-ze-hex/rocksdb,hobinyoon/rocksdb,vmx/rocksdb,hobinyoon/rocksdb,vmx/rocksdb,tsheasha/rocksdb,facebook/rocksdb,OverlordQ/rocksdb,norton/rocksdb,vmx/rocksdb,SunguckLee/RocksDB,wenduo/rocksdb,vmx/rocksdb,tsheasha/rocksdb,bbiao/rocksdb,SunguckLee/RocksDB,jalexanderqed/rocksdb,wenduo/rocksdb,wat-ze-hex/rocksdb,bbiao/rocksdb,OverlordQ/rocksdb,jalexanderqed/rocksdb,bbiao/rocksdb,vmx/rocksdb,wat-ze-hex/rocksdb,wenduo/rocksdb,wenduo/rocksdb,wenduo/rocksdb,jalexanderqed/rocksdb,Andymic/rocksdb,wat-ze-hex/rocksdb,norton/rocksdb,wat-ze-hex/rocksdb,Andymic/rocksdb,jalexanderqed/rocksdb