def _consume(seq, num, func=None):
 num = _B(num)
 c = seq[:num]
 r = seq[num:]
 if func:
  c = func(c)
 return (c, r)

def _consume ( seq , num , func = None ) : num = _B ( num ) c = seq [ : num ] r = seq [ num : ] if func : c = func ( c ) return ( c , r )
consume the num of bytes return a tuple of func -- a function to call on the consumed .