News:

Download Pelles C here: http://www.pellesc.se

Main Menu

Recent posts

#11
User contributions / Re: Github-kuba miniz for Pell...
Last post by TimoVJL - April 22, 2026, 07:52:44 PM
LibreOffice 7.1
MS Office 2010
#12
User contributions / Re: Github-kuba miniz for Pell...
Last post by John Z - April 22, 2026, 07:43:12 PM
Thanks Timo,

Quote from: TimoVJL on April 22, 2026, 07:30:25 PMLibre Office opens a that A_BaseFile_imp_T_32bit.ods normally.

Can you let me know what LibreOffice version you have?

Thanks,
John Z

P.S. for excel you must right click on the file and choose Open With Excel.
#13
User contributions / Re: Github-kuba miniz for Pell...
Last post by TimoVJL - April 22, 2026, 07:30:25 PM
Libre Office opens a that A_BaseFile_imp_T_32bit.ods normally.

#14
User contributions / Re: Github-kuba miniz for Pell...
Last post by John Z - April 22, 2026, 05:21:38 PM
Oh yes, I did try using the ('w' - 64) attribute to open as 32 bit with my version.
Convention:

    Use 'w' - 64 (integer value 55) when calling zip_open, zip_stream_open, etc., to select write mode without enabling ZIP64.
    The same pattern applies to other modes: use 'r' - 64, 'a' - 64, 'd' - 64 to pick the non-ZIP64 variants.

I will try that again, with your version, and post.

Thanks,

John Z

Update: Created with 'w' - 64  (but I'm not sure how to really tell if 32bit or 64bit ZIP)  using 7z Info does not show as 64 bit while prior version does, so this must be 32 bit.  It has the same symptom.
#15
User contributions / Re: Github-kuba miniz for Pell...
Last post by TimoVJL - April 22, 2026, 05:10:11 PM
That A_BaseFile_imp_T_311T.ods is 64bit zip, perhaps a reason why it isn't accepted.
#16
Bug reports / Re: Some fonts are missing fro...
Last post by Pelle - April 22, 2026, 03:33:31 PM
OK, cool. The fix will be in the next update.
#17
User contributions / Re: Github-kuba miniz for Pell...
Last post by John Z - April 22, 2026, 03:18:32 PM
HI Timo,

Sure here are two files _good is with the older version, _311T is with the current version.
The headers are different - The compressed data itself for the files looks fairly much the same on a quick check.  The file sizes are different too when looking at the actual. Both versions open in 7z without complaint.

Both files used the same source data and same program except swapping zip procs -
good file is 3,703 bytes
not so good file is 3,938 bytes

John Z

LibreOffice 25.8
Excel 2010
#18
User contributions / Re: Github-kuba miniz for Pell...
Last post by TimoVJL - April 22, 2026, 02:45:00 PM
John Z,
can you give a small example file for tests with Libre Office and MS Office ?
#19
User contributions / Re: Github-kuba miniz for Pell...
Last post by John Z - April 22, 2026, 02:07:32 PM
Thanks Timo, Vortex,

Well surprising results.  I built your version.  Very good I had not thought to use __MINGW32__ so my build ended up with more code 'customizations'. 

However, when I used your version to create an ODF spreadsheet it ended up with the same exact issue!  Note that I have been using using an older version of miniz to do the same thing successfully, so any issue is only related to the new miniz.

Just like with my mod of miniz, both ODF and Excel indicate a problem which they both can  'repair' and all spreadsheet data is there. Whereas Explorer ZIP, and 7z have no issue unzipping the file, and show no error report.

So there is some sort of (minor repairable) incompatibility with ODF/Excel expectations when using the newest 3.1.1 64 bit capable version.  I did try it with the 32 bit fileopen ('w'-64) and it was the same.

Looks like I'll be sticking with the old perfectly working version for now...at least until I can spend time to figure out the difference.

John Z
#20
User contributions / Re: Github-kuba miniz for Pell...
Last post by Vortex - April 22, 2026, 11:05:10 AM
Hi Timo,

Great work, thanks. Based on your sample, here is a modified version creating the archive test.zip and adding the file sample.docx

#include <stdlib.h>
//#include <zip.h>
#pragma comment(lib, "zip.lib")
//#include "zip_stdcall.h"
#define ZIP_DEFAULT_COMPRESSION_LEVEL 6
typedef struct zip_t zip_t;
extern struct zip_t __stdcall *zip_open(const char *zipname, int level, char mode);
extern int __stdcall zip_entry_open(struct zip_t *zip, const char *entryname);
extern int __stdcall zip_entry_fwrite(struct zip_t *zip, const char *filename);
extern int __stdcall zip_entry_close(struct zip_t *zip);
extern int __stdcall zip_close(struct zip_t *zip);

int __cdecl main(void)
{
    struct zip_t *zip = zip_open("test.zip", ZIP_DEFAULT_COMPRESSION_LEVEL, 'w');
    {
        zip_entry_open(zip, "sample.docx");
        {
            zip_entry_fwrite(zip, "sample.docx");
        }
        zip_entry_close(zip);
    }
    zip_close(zip);
    return 0;
}