Pure python AIS decode and encode