Does some fancy math to decode packet structures.