def _truncate_bitmap(what):
 for i in xrange((len(what) - 1), (-1), (-1)):
  if (what[i] != '\x00'):
   break
 return ''.join(what[0:(i + 1)])

def _truncate_bitmap ( what ) : for i in xrange ( ( len ( what ) - 1 ) , ( - 1 ) , ( - 1 ) ) : if ( what [ i ] != '\x00' ) : break return '' . join ( what [ 0 : ( i + 1 ) ] )
determine the index of greatest byte that isnt all zeros .