don't do that. If you care about size of the installed OS, first compress it using the old NTFS compression. Then capture the image in a WIM. Then restore/deploy the image using wimlib-imagex apply with the -compact=LZX switch. Compact OS alone is stupid as MS implemented it, at least the 30 Y/O NTFS compression mitigates its drawbacks (while retaining most of its strengths).