Optimize output size of kpm pack

parent #652