refactor: use gzip library's compress() and decompress() methods directly (#37611)
The util methods in framework were added for python2.7 compat, so can be removed
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
[skip ci]
(cherry picked from commit 21c3d9c3712ffca28d763b560ec8dbc9e5512fb0)
Co-authored-by: Akhil Narang <me@akhilnarang.dev>