aiui-optimize
AIUI Package Optimization
Identify what makes each package large, then implement and measure authorized optimizations. Respect the user's scope: an audit is read-only; a request to optimize includes appropriate source and build changes. Do not upload assets, publish packages, or change remote services without authorization for that action.
Package size requirements
Each released AIX package must be at most 2 MiB (2,097,152 bytes). The recommended target is at most 1 MiB (1,048,576 bytes). These limits apply to the actual complete package file, including ZIP and AIX metadata, not the sum of extracted files. For resources moved out of the package, assess the package itself against these limits and report later transfer and cache storage separately.
Classify each measured package using byte values: over 2 MiB is over the required limit; over 1 MiB and at most 2 MiB meets the limit but exceeds the recommended target; at most 1 MiB meets the recommended target. Values exactly on either boundary satisfy that boundary. A report filter may narrow which packages are analyzed, but must not be confused with these requirements.
When executing optimization, work toward the 1 MiB recommendation while meeting the 2 MiB limit. Verify the final built artifact's bytes: a projection is not proof of compliance. If the actual package remains over 2 MiB or cannot be rebuilt or measured, report it explicitly and do not claim the size requirement is met. If it meets 2 MiB but not 1 MiB, report that distinction and the remaining gap.
Establish the baseline
- Identify the input: AIUI source,
.aixpackage(s), or an inventory with package paths and sizes. Preserve unrelated changes. If only an inventory is available, distinguish its totals from inspected archive contents; report inaccessible or size-mismatched packages. Apply the size requirements above in bytes; respect a separately requested analysis filter and distinguish MB from MiB. For spreadsheets, use the available spreadsheet workflow. - Measure actual package bytes and inspect archive entries, including compressed and uncompressed sizes. AIX is ZIP-based; a raw ZIP edit is not a valid replacement for the AIX build and integrity workflow. Do not extract an untrusted archive blindly. The standard-library helper below inventories local archives without extracting them: