remove code duplication for byteswapping
remove code duplication for byteswapping

umlaeute/ambix,iem-projects/ambix,kronihias/libambix,iem-projects/ambix,iem-projects/ambix,umlaeute/ambix,kronihias/libambix,umlaeute/ambix