Skip to content

split: allow a different size limit for each part - #23

Open
chokore wants to merge 1 commit into
ebiggers:masterfrom
chokore:split-per-part-size
Open

chokore wants to merge 1 commit into
ebiggers:masterfrom
chokore:split-per-part-size

Conversation

@chokore

@chokore chokore commented Oct 5, 2026

Copy link
Copy Markdown

wimlib-imagex split currently applies a single size limit to every part, which makes it impossible to span a WIM across media with unequal capacities.

Concrete case: a Windows 11 install.wim (~7400 MiB) that has to fit on two 4.7 GB DVDs, where the first disc also carries the boot files. The first part must stay under ~3467 MiB while the second one takes whatever is left. With wimlib-imagex split install.wim install.swm 3467, three parts come out, because every part is capped at 3467 MiB: ceil(7409 / 3467) = 3.

Changes:

  • lib: new wimlib_split_ex(), which takes a per-part list of size limits plus a default limit for the parts beyond the list. wimlib_split() is now a thin wrapper over it and keeps its exact signature and behavior, so there is no breakage for existing callers.
  • wimlib-imagex split: PART_SIZE now also accepts a comma-separated list, e.g.
    3467,rest,3467,* (first part <= 3467 MiB, second part takes the rest) ,3467,1350,2700 or 3467,1350 (the last value is repeated for any further parts). A single number behaves exactly as before, and rest / * means "unlimited".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant