PacketWrite for easy packet creation and manipulation