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:
1 parent
798db14bb5
commit
c8a6325615
15 files changed
+131
-345
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user