stachenov / quazip

Qt/C++ wrapper over minizip
Other
582 stars 232 forks source link

Change "Host OS" from Unix to FAT #160

Closed florianstefanwerner closed 2 years ago

florianstefanwerner commented 2 years ago

Hi. Is it possible to change the used "Host OS" from Unix to FAT, if I compress a file or directory? We would need this to be compatible to another part of our code.

Host OS - Unix to Fat

Kind regards

XERGER commented 2 years ago

fork it and adapt it for your needs?

florianstefanwerner commented 2 years ago

Sorry, I am not so familiar with working with archives. Is there an option or a flag I can change, or what do I have to do to archieve this? Can you give me a hint?

stachenov commented 2 years ago

Should be easy, but the earliest I can possibly get to this is the weekend because I've got a job to do on weekdays.

florianstefanwerner commented 2 years ago

If you can have a look at the weekend, this would be great! Thanks

stachenov commented 2 years ago

Finally had some free time for this.

See the QuaZip::setDefaultOsCode() and QuaZip::setOsCode() methods (static/global and per-instance respectively).

The codes themselves are described in the famous APPNOTE.txt as

        4.4.2.2 The current mappings are:

         0 - MS-DOS and OS/2 (FAT / VFAT / FAT32 file systems)
         1 - Amiga                     2 - OpenVMS
         3 - UNIX                      4 - VM/CMS
         5 - Atari ST                  6 - OS/2 H.P.F.S.
         7 - Macintosh                 8 - Z-System
         9 - CP/M                     10 - Windows NTFS
        11 - MVS (OS/390 - Z/OS)      12 - VSE
        13 - Acorn Risc               14 - VFAT
        15 - alternate MVS            16 - BeOS
        17 - Tandem                   18 - OS/400
        19 - OS X (Darwin)            20 thru 255 - unused

Whatever your software means by FAT, I'm unsure, but most likely it's zero.

Please either close this issue if it's what you were looking for, or comment otherwise.

florianstefanwerner commented 2 years ago

Yes, this was what I am looking for. Thank you very much!