Add magic cookie property to encoder.
Document cookie.
Record packet offsets.