HWLOC-COMPRESS-DIR(1)

πŸ’… hwloc-compress-dir β€” bestie's guide to squishing XML topologies

okay so this is hwloc-compress-dir, straight out of the hwloc manual (section 1, if you're keeping score πŸŽ€). She compresses a whole directory of XML topologies, and honestly? iconic behaviour.


✨ SYNOPSIS ✨

hwloc-compress-dir [options] <inputdir> <outputdir>

two directories, bestie. one going in, one coming out. that's the whole vibe check. πŸ¦‹


🌸 OPTIONS 🌸

  • -R, --reverse β€” un-squish it, queen πŸ’… β€” reverses the whole thing and uncompresses a directory that was previously compressed.
  • -v, --verbose β€” she talks. a lot. displays verbose messages so you actually know what's happening πŸ”
  • --version β€” reports the version and dips out immediately. no further questions ✌️
  • -h, --help β€” dumps the help message and exits. your little safety net 🫢

πŸ’– DESCRIPTION πŸ’–

so hwloc-compress-dir takes an input directory full of XML exports and tries to compress it by computing topology diffs between them β€” using the hwloc-diff program, ngl that's the real MVP here. then each file gets copied into the output directory, and it ends up as either a diff (if it could be compressed, slay) or its original entire file if it couldn't. no cap, that's it.

she can also recompress a directory that was previously compressed. the way that works: all input files that are already in the output directory β€” compressed or not β€” are ignored. yeah, ignored. don't come for her. new input files get compressed as much as possible, as usual πŸ’β€β™€οΈ

for each file in the directory, the output filename is the same as the original if it's not compressed β€” otherwise its extension gets changed to .diff.xml. periodt. πŸ”₯

compressed files are based on another non-compressed topology, and its name is stored in the refname topology diff attribute. (iykyk 🌈)

the generated output diff files may be used with hwloc-patch β€” just like any file generated by hwloc-diff. chefs kiss πŸ‘‘


πŸŽ€ EXAMPLES πŸŽ€

to compress the input files from directory in into directory out:

$ hwloc-compress-dir in out

that's it. that's the whole example. go off πŸ’œ


⭐ RETURN VALUE ⭐

upon successful execution, hwloc-compress-dir returns 0. we love a clean exit. πŸŽ‰

hwloc-compress-dir will return nonzero if any kind of error occurs β€” such as (but not limited to) failure to parse the command line. so like, if you type it wrong, that's on you bestie 😭


πŸ¦‹ SEE ALSO πŸ¦‹

hwloc(7), lstopo(1), hwloc-diff(1), hwloc-patch(1)


version 2.15.0, dated Sep 23, 2026 β€” mwah, bye bestie, go compress something πŸ’‹βœ¨πŸ§š

πŸ“¦ where this page comes from