def align_block(raw, multiple=4, pad='\x00'):
 extra = (len(raw) % multiple)
 if (extra == 0):
  return raw
 return (raw + (pad * (multiple - extra)))

def align_block ( raw , multiple = 4 , pad = '\x00' ) : extra = ( len ( raw ) % multiple ) if ( extra == 0 ) : return raw return ( raw + ( pad * ( multiple - extra ) ) )
return raw with enough pad bytes append to ensure its length is a multiple of 4 .