From 6069a793eaa2e11e0c53af0ab063d22fb1f9f531 Mon Sep 17 00:00:00 2001 From: nkk71 Date: Tue, 19 Jan 2016 16:36:47 +0200 Subject: minzip: Add support for >2GB zipfile normal zip limit is 4GB, but due to signed variables it will only access 2GB (32bit signed integer is from -2GB to +2GB). these changes allow for a theoretical limit of 4GB zips to be flashed. RAM restrictions still apply, and on a 32bit system it's likely to max out at approx 2.8GB flashable zip, above that mmap will probably fail. Note: the flashable zip also needs a compatible update-binary which include these changes. (this also applies to both aroma installer if it's being used). Change-Id: Ib3af2945c9bd4890a2e6dc45acfc2b80ec55473b --- minzip/Zip.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'minzip/Zip.h') diff --git a/minzip/Zip.h b/minzip/Zip.h index 86d8db597..0a0345159 100644 --- a/minzip/Zip.h +++ b/minzip/Zip.h @@ -32,7 +32,7 @@ extern "C" { typedef struct ZipEntry { unsigned int fileNameLen; const char* fileName; // not null-terminated - long offset; + loff_t offset; long compLen; long uncompLen; int compression; @@ -85,7 +85,7 @@ void mzCloseZipArchive(ZipArchive* pArchive); const ZipEntry* mzFindZipEntry(const ZipArchive* pArchive, const char* entryName); -INLINE long mzGetZipEntryOffset(const ZipEntry* pEntry) { +INLINE loff_t mzGetZipEntryOffset(const ZipEntry* pEntry) { return pEntry->offset; } INLINE long mzGetZipEntryUncompLen(const ZipEntry* pEntry) { -- cgit v1.2.3