Sorry, I didn't realize that we aren't talking about the Query class.
It'll be slightly more work, but it's nothing impossible.
First of all, decide which properties of InitialQueryParameter you need to support. I'll assume that you want just the query.
In that case, you need to get a query from InitialQueryParameter and call its pack() method. That's easy:
container packedQuery = initialQuery().query().pack();
When unpacking the object, you need to create an InitialQueryParameter instance from the packed query. That's not difficult either:
initialQuery = InitialQueryParameter::createByQuery(newQuery(packedQuery));
Note that you can use SysPackExtensions class to add your values to the standard contain in an extension of pack(), and extract your packed values in unpack().