PureZIP library : ZIP / UNZIP files
Moderator: gnozal
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Update
New function : PureZIP_SetArchivePassword() ; set current archive password for both compress and extract functions.
New function : PureZIP_SetArchivePassword() ; set current archive password for both compress and extract functions.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Update
- PureZIP now uses ZLIB's crc32() instead of PB's CRC32FingerPrint()
- New ZLIB functions in PureZIP_W library
- Somes fixes with password and compress from memory
- PureZIP now uses ZLIB's crc32() instead of PB's CRC32FingerPrint()
- New ZLIB functions in PureZIP_W library
- Somes fixes with password and compress from memory
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- NoahPhense
- Addict
- Posts: 1999
- Joined: Thu Oct 16, 2003 8:30 pm
- Location: North Florida
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Update
- ZLIB static lib is now V1.2.3
Update information
zlib 1.2.3
July 18, 2005
Version 1.2.3 eliminates potential security vulnerabilities in zlib 1.2.1 and 1.2.2, so all users of those versions should upgrade immediately. The following important fixes are provided in zlib 1.2.3 over 1.2.1 and 1.2.2:
Eliminate a potential security vulnerability when decoding invalid compressed data
Eliminate a potential security vulnerability when decoding specially crafted compressed data
Fix a bug when decompressing dynamic blocks with no distance codes
Fix crc check bug in gzread() after gzungetc()
Do not return an error when using gzread() on an empty file
- ZLIB static lib is now V1.2.3
Update information
zlib 1.2.3
July 18, 2005
Version 1.2.3 eliminates potential security vulnerabilities in zlib 1.2.1 and 1.2.2, so all users of those versions should upgrade immediately. The following important fixes are provided in zlib 1.2.3 over 1.2.1 and 1.2.2:
Eliminate a potential security vulnerability when decoding invalid compressed data
Eliminate a potential security vulnerability when decoding specially crafted compressed data
Fix a bug when decompressing dynamic blocks with no distance codes
Fix crc check bug in gzread() after gzungetc()
Do not return an error when using gzread() on an empty file
Last edited by gnozal on Fri Jul 22, 2005 10:25 am, edited 1 time in total.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
There will be no disaster :Rings wrote:would be nice to get a ZIP-lib including with source to avoid the desaster with previous versions and compatibility.
just a suggestion

- no source lost after a hard disk crash (I make backups) ;
- no version compatibility problem (if I loose interest in Purebasic, I will release all my lib sources like you or Danilo did).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- NoahPhense
- Addict
- Posts: 1999
- Joined: Thu Oct 16, 2003 8:30 pm
- Location: North Florida
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- NoahPhense
- Addict
- Posts: 1999
- Joined: Thu Oct 16, 2003 8:30 pm
- Location: North Florida
- NoahPhense
- Addict
- Posts: 1999
- Joined: Thu Oct 16, 2003 8:30 pm
- Location: North Florida
I tried this:
Code: Select all
myzip.s = "test.zip"
myzipfile1.s = "t.mp3"
myzipfile2.s = "a.txt"
If PureZIP_Archive_Create(MyZIP.s, #APPEND_STATUS_CREATE)
Debug PureZIP_Archive_Compress(MyZIPFile1.s, #FALSE)
Debug PureZIP_Archive_Compress(MyZIPFile2.s, #FALSE)
PureZIP_Archive_Close()
EndIf
From inside the IDE, works great.. if I compile out to an exe.. I get a
22 byte file..?
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
There are 3 libs :Rings wrote:i thought only that most of the stuff (ZLib) is already OpenSource or under a GPL.Don't know exactly if you wrote more than a wrapper.
- PureZIP_O : original ZLIB static lib
- PureZIP_W : wrapper to ZLIB static lib
- PureZIP_L : ZIP and UNZIP functions using PureZIP_W functions (not a wrapper, you have to use the basic ZLIB functions to build ZIP archive compatible functions)
Yes, strange (never tested it like this, only in 'real' apps)...NoahPhense wrote:From inside the IDE, works great.. if I compile out to an exe.. I get a 22 byte file..?
With this I get a 22 byte file :
Code: Select all
myzip.s = "c:\purebasic393\program\PureZIP-test.zip"
myzipfile1.s = "C:\PureBasic393\Program\PureCOLOR_TEST_2.pb"
myzipfile2.s = "C:\PureBasic393\Program\PureCOLOR_TEST_3.pb" If PureZIP_Archive_Create(myzip.s, #APPEND_STATUS_CREATE)
PureZIP_Archive_Compress(myzipfile1.s, #False)
PureZIP_Archive_Compress(myzipfile2.s, #False)
PureZIP_Archive_Close()
EndIf
Code: Select all
myzip.s = "c:\purebasic393\program\PureZIP-test.zip"
myzipfile1.s = "C:\PureBasic393\Program\PureCOLOR_TEST_2.pb"
myzipfile2.s = "C:\PureBasic393\Program\PureCOLOR_TEST_3.pb"
OpenConsole()
If PureZIP_Archive_Create(myzip.s, #APPEND_STATUS_CREATE)
PureZIP_Archive_Compress(myzipfile1.s, #False)
PureZIP_Archive_Compress(myzipfile2.s, #False)
PureZIP_Archive_Close()
EndIf
CloseConsole()
Code: Select all
myzip.s = "c:\purebasic393\program\PureZIP-test.zip"
myzipfile1.s = "C:\PureBasic393\Program\PureCOLOR_TEST_2.pb"
myzipfile2.s = "C:\PureBasic393\Program\PureCOLOR_TEST_3.pb"
If OpenWindow(0,0,0,0,0,0,"")
If PureZIP_Archive_Create(myzip.s, #APPEND_STATUS_CREATE)
PureZIP_Archive_Compress(myzipfile1.s, #False)
PureZIP_Archive_Compress(myzipfile2.s, #False)
PureZIP_Archive_Close()
EndIf
EndIf
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
@gnozal
Thanks a lot for your hard Work!!!!!!!
I am working under Windows XP and PB 3.93.
The Memorycompress example works fine.
The PureZIP_Archive_Create() command seems to be OK.
But if i try to Compile with PureZIP_Archive_Compress(), i get this error:

The flags are always the same.
Please write the explanaition in all your helpfiles:
I thought PureZIP_W stands for Windows and PureZIP_L for Linux....
Thanks a lot for your hard Work!!!!!!!
I am working under Windows XP and PB 3.93.
The Memorycompress example works fine.
The PureZIP_Archive_Create() command seems to be OK.
But if i try to Compile with PureZIP_Archive_Compress(), i get this error:

The flags are always the same.
Please write the explanaition in all your helpfiles:
It took me a long time to find out what is what.There are 3 libs :
- PureZIP_O : original ZLIB static lib
- PureZIP_W : wrapper to ZLIB static lib
- PureZIP_L : ZIP and UNZIP functions using PureZIP_W functions (not a wrapper, you have to use the basic ZLIB functions to build ZIP archive compatible functions)
I thought PureZIP_W stands for Windows and PureZIP_L for Linux....
Develop Standards, and you develop the World!
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Could you provide some code please ?PAMKKKKK wrote:But if i try to Compile with PureZIP_Archive_Compress(), i get this error
Well, it's L for librarydagcrack wrote:Shouldnt PureZIP_L be called PureZIP_F ? (for: Functions)

I could add a sentence like Fangbeast : "As with all my apps, use this if you like it, don't use it if you don't like it. Suggestions on how to improve, bug reports are welcome. Stupid comments, criticisms, arrogant gum flapping etc, are not."dagcrack wrote:Doesnt seem like he likes to gift his sources - which is ok, but however hes giving the libs for free why you ask for more? You people... always trying to suck as much as possible from others!!!

Note :
There is a known problem with PureZIP and the ImagePluginPNG purebasic library. If you use both in the same program, you will get a POLINK error "Symbol '_inflate_copyright' is multiply defined" because both use the ZLIB static library.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).