def zlib_encode(input, errors='strict'):
 assert (errors == 'strict')
 output = zlib.compress(input)
 return (output, len(input))

def zlib_encode ( input , errors = 'strict' ) : assert ( errors == 'strict' ) output = zlib . compress ( input ) return ( output , len ( input ) )
encodes the object input and returns a tuple .