move pipeutil to struct pack and unpack