some byte functions for packet manipulation