Write Support for packed fields

adds support for writing packed primitive fields