Collapse dusk.dsk from two zip archives into one, all uncompressed

Bulk assets (mp3, png) are already compressed at the file level, so a
DEFLATE pass on top bought negligible space for real CPU cost. Packs
everything into a single ZIP_STORED archive instead, so every entry
(not just locale/*) gets the reliable repeated seeking/re-opening that
libzip only supports for uncompressed entries. Header shrinks from 32
to 16 bytes; version bumped to 2 so a stale pre-change dusk.dsk is
rejected and rebuilt rather than misread.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
YourWishesandClaude Sonnet 5 committed 2026-09-09 10:17:34 -05:00
1 parent 798db14bb5
commit c8a6325615
15 files changed
+131 -345

No files matched your search

+1 -3
View File
@@ -91,9 +91,7 @@ errorret_t assetInitDolphinDVD(void) {
);
if(!data) errorThrow("Failed to read asset file from ISO.");
errorret_t ret = assetDskOpenFromBuffer(
data, fileSize, &ASSET.zip, &ASSET.zipStored
);
errorret_t ret = assetDskOpenFromBuffer(data, fileSize, &ASSET.zip);
if(errorIsNotOk(ret)) {
memoryFree(data);
errorChain(ret);
+1 -1
View File
@@ -25,7 +25,7 @@
typedef struct {
// Whole dusk.dsk blob read from the ISO, kept alive for as long as
// ASSET.zip/ASSET.zipStored are open since they're non-owning windows
// ASSET.zip is open since it's a non-owning window
// into it (see assetDskOpenFromBuffer). Freed in assetDisposeDolphinDVD.
uint8_t *dskData;
} assetdolphindvd_t;
+1 -1
View File
@@ -56,7 +56,7 @@ errorret_t assetInitDolphinFAT(void) {
if(foundPath[0] == '\0')
errorThrow("Failed to find asset file on FAT filesystem.");
errorChain(assetDskOpenFromPath(foundPath, &ASSET.zip, &ASSET.zipStored));
errorChain(assetDskOpenFromPath(foundPath, &ASSET.zip));
errorOk();
}