Research and documentation in this area generally fall under and reverse engineering . If you are looking for technical depth on how these files interact, you should explore the following topics: 1. Software Packaging and Distribution Research
Since RAR is an archive and PKG is an installer, the "conversion" is actually . Here is how to do it on every major operating system. rar to pkg
No. Because RAR is a container and PKG is an application installer, they serve different purposes. You extract, not convert. Research and documentation in this area generally fall