
PureZIP library : ZIP / UNZIP files
Moderator: gnozal
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
No, sorry.Sveinung wrote:Will your lib support the inflate() and deflate() commands (zLib 1.23) ?
I chose to only expose ready to use ZIP compatible functions.
But if you need 'raw' compression you could try PureZIP_PackMemory() / PureZIP_UnpackMemory() wich implement the ZLIB compress() and uncompress() functions. Or PB's JCALG1 compression routines. Or BriefLZ.
Here you will find some deflate / gz examples : http://www.purebasic.fr/german/viewtopic.php?t=10088
Or here (same code examples but with static library instead of userlibrary) : http://freenet-homepage.de/gnozal/PBLIB ... c_GZip.zip
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:
No. It's a ZLIB limit. The library uses longs.Sveinung wrote:Will you lib support file sizes above 4 Gb?
Anyway, for serious archiving, I would use something like 7ZIP or SQX.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
On PB4.20b5 the V4.20 library get a polink error if this is included:
It says the polink error is to do with PB_Delay?
Code: Select all
Debug PureZIP_AddFiles(myzip$,"data\*.*",#PureZIP_StorePathAbsolute,#PureZIP_RecursiveZeroDirs)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
Confirmed,
Up to 126 programs correctly compiled with 4.20b5.
But the only one using PureZip4.20 (v1.93) gives an error:
I don't use the "Delay" OR "Debug" commands on my code.
I'm using
Up to 126 programs correctly compiled with 4.20b5.
But the only one using PureZip4.20 (v1.93) gives an error:
Code: Select all
Error: Linker
POLINK: error: Unresolved external symbol 'PB_Delay'.
POLINK: fatal error: 1 unresolved external(s).
I'm using
Code: Select all
PureZIP_AddFiles(zipfile$, abspath$\*.*, #PureZIP_StorePathRelative, #PureZIP_Recursive)
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
When I have some time, I will update my libs for beta 5 (they will be updated for PB4.20 final, but I may not have the time to update for every new beta).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
No problem.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
-
- Enthusiast
- Posts: 746
- Joined: Fri Jul 14, 2006 8:53 pm
- Location: Malta
- Contact:
is it normal that when I compress with PureZIP_PackMemory, and after unpack with PureZIP_UnpackMemory, the original uncompressed size is different?
I may not help with your coding
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
Just ask about mental issues!
http://www.lulu.com/spotlight/kingwolf
http://www.sen3.net
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Seems to be the same length here [tested with PB4.20] :kinglestat wrote:is it normal that when I compress with PureZIP_PackMemory, and after unpack with PureZIP_UnpackMemory, the original uncompressed size is different?
Code: Select all
PackTest.s = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"
SourceLength = Len(PackTest)
Debug SourceLength
*SourceMemoryID = AllocateMemory(SourceLength)
PokeS(*SourceMemoryID, PackTest, SourceLength)
DestinationLength = SourceLength + (SourceLength * 0.01) + 12
*DestinationMemoryID = AllocateMemory(DestinationLength)
Debug PureZIP_PackMemory(*SourceMemoryID, SourceLength, *DestinationMemoryID, @DestinationLength)
Debug DestinationLength
Debug PureZIP_UnpackMemory(*DestinationMemoryID, DestinationLength, *SourceMemoryID, @SourceLength)
Debug SourceLength
UnpackTest.s = Space(SourceLength)
UnpackTest = PeekS(*SourceMemoryID, @SourceLength)
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).