Page 1 of 1

Detect solid compression

Posted: Wed Oct 11, 2023 8:10 am
by JFX
Is there a quick way to tell if the WIM/ESD has solid compression?
wimlib-imagex info does not show a difference between the two.

EDIT: Ok, found wim_has_solid_resources() that gives the info I needed.

Re: Detect solid compression

Posted: Thu Oct 12, 2023 7:56 am
by synchronicity
For most purposes just using the WIM version number should be fine: 68864 = .wim, 3584 = .esd. But as you may have noticed, technically the v3584 just allows solid resources; there might not actually be any. If you want to know for sure whether there are any solid resources you indeed need to explicitly check for that. wim_has_solid_resources() works for code inside wimlib. On the command line, `wiminfo --blobs wimfile | grep -q WIM_RESHDR_FLAG_SOLID` can be used. With the public API, calling wimlib_iterate_lookup_table() and checking whether wimlib_resource_entry::packed is ever set can be used.

Re: Detect solid compression

Posted: Thu Oct 12, 2023 5:27 pm
by JFX
Thank you, wimlib_iterate_lookup_table() is what I was looking for.