def decode_fvwi(byts, flag_size=4):
 (arg, consumed) = decint(bytes(byts))
 val = (arg >> flag_size)
 flags = 0
 for i in xrange(flag_size):
  flags |= (arg & (1 << i))
 return (val, flags, consumed)

def decode_fvwi ( byts , flag_size = 4 ) : ( arg , consumed ) = decint ( bytes ( byts ) ) val = ( arg >> flag_size ) flags = 0 for i in xrange ( flag_size ) : flags |= ( arg & ( 1 << i ) ) return ( val , flags , consumed )
decode encoded fvwi .