Pack values and write the packed bytes into the buffer. Pack the provided values according to the struct format string and write the packed bytes into the writable buffer starting at offset. Note that the offset is a required argument. A negative offset counts from the end of the buffer. See help(struct) for more on format strings.