IPA: /kəmˈpæktli/
KK: /kəmˈpæktli/
In a way that is small and efficient, taking up little space.
The books were arranged compactly on the shelf to save space.
Compactly → It is formed from "com-" (meaning together) and "pact" (from Latin "pactum", meaning something agreed upon or a contract) and the suffix "-ly" (meaning in a manner). The word "compactly" means in a manner that brings things together closely or in a small space.
Think of things being brought 'together' ('com-') in a 'contract' ('pact') — that's why compactly means arranged closely together.