call the function pickle.dumps with argument value, use the result and integer -1 as arguments for the call to the function zlib.compress, use the result as an argument for the call to the f.write method.
f . write ( zlib . compress ( pickle . dumps ( value ) , - 1 ) )