It is currently Thu May 28, 2020 3:12 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 600 posts ]  Go to page Previous  1 ... 35, 36, 37, 38, 39, 40  Next
Author Message
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Tue Jan 11, 2011 10:46 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Starwolf20 wrote:
Hi Gnozal
The 1er post says that PureZip uses Zlib V1.23.
The ZLIB website says that the last version is V1.25. Is an update of PureZip planned ?
Thanks
Hi,
Sometimes ago I tried to update PureZIP with the static library from Gilles Vollant's site, but I didn't manage to use it with PB, because of linker errors iirc.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Sat Apr 02, 2011 10:22 pm 
Offline
Addict
Addict

Joined: Wed Nov 12, 2008 5:01 pm
Posts: 1109
Location: Russia
How can I add to ZIP Archive, an empty folder (which does not contain any files) by using the PureZIP_Archive_Compress?

_________________
Library XP_Menu_Lib - office menu; HID_Lib - USB Library
Torrent client - pbTorrent (source code); Create driver in PureBasic.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Wed Apr 13, 2011 9:27 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
User_Russian wrote:
How can I add to ZIP Archive, an empty folder (which does not contain any files) by using the PureZIP_Archive_Compress?
You can't !

However, you may use PureZIP_AddFiles() with #PureZIP_RecursiveZeroDirs flag to store empty folders.
But do not use this function within a PureZIP_Archive_Create() / PureZIP_Archive_Close() sequence.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Wed Apr 20, 2011 7:28 pm 
Offline
Addict
Addict

Joined: Wed Nov 12, 2008 5:01 pm
Posts: 1109
Location: Russia
gnozal wrote:
User_Russian wrote:
How can I add to ZIP Archive, an empty folder (which does not contain any files) by using the PureZIP_Archive_Compress?
You can't !

However, you may use PureZIP_AddFiles() with #PureZIP_RecursiveZeroDirs flag to store empty folders.
But do not use this function within a PureZIP_Archive_Create() / PureZIP_Archive_Close() sequence.

I create self-extracting (SFX) archive, using
Code:
PureZIP_Archive_Create(ArchiveFileName.s, #APPEND_STATUS_CREATEAFTER)
Therefore, the function PureZIP_AddFiles () can not be used.
What should do?

_________________
Library XP_Menu_Lib - office menu; HID_Lib - USB Library
Torrent client - pbTorrent (source code); Create driver in PureBasic.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Thu Apr 21, 2011 11:02 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
User_Russian wrote:
I create self-extracting (SFX) archive, using [code]PureZIP_Archive_Create(ArchiveFileName.s, #APPEND_STATUS_CREATEAFTER).
Therefore, the function PureZIP_AddFiles () can not be used.
What should do?

You can create the archive ("archive.zip") and then add the sfx stub ("archive.sfx").

You may use the console (COPY /B archive.sfx+archive.zip archive.exe) or purebasic's file functions.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Wed Jul 13, 2011 2:28 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Update (PB4.60 version)

Changes :
  - new function : PureZIP_DeleteFile(Archive.s, FileToDelete.s)
  - new function : PureZIP_RenameFile(Archive.s, OldFileName.s, NewFileName.s)

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Tue Jul 19, 2011 2:26 pm 
Offline
User
User

Joined: Tue Oct 28, 2008 1:08 pm
Posts: 42
Gnozal, what about archive size ? Can we rise these nums?


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Tue Jul 19, 2011 3:03 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
besko wrote:
Gnozal, what about archive size ? Can we rise these nums?
PureZIP (ZLIB) should support archive sizes up to 2GB.
However I wouldn't use ZIP for big archives, because :
- some compressors achieve much better compression ratio (RAR, 7-ZIP, ...)
- ZIP doesn't have recovery capabilities like RAR for example

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Fri Jul 22, 2011 5:26 pm 
Offline
Addict
Addict

Joined: Thu Nov 01, 2007 5:37 pm
Posts: 1981
Location: Germany
Hi Gnozal, I have two questions:

Is it possible to set the compression level and if not could you please add it?

Also you wrote somewhere that Unicode isn't properly supported. What does that exactly mean?

_________________
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Sat Jul 23, 2011 8:30 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
c4s wrote:
Is it possible to set the compression level and if not could you please add it?
You may use PureZIP_SetCompressionAlgorithm() to choose between #Z_NO_COMPRESSION and #Z_DEFLATED.
As #Z_DEFLATED is so fast, PureZIP always uses #Z_BEST_COMPRESSION. There is no point using any other compression level.
c4s wrote:
Also you wrote somewhere that Unicode isn't properly supported. What does that exactly mean?
In a (PKZIP 2.04g) ZIP archive, the filenames are stored as OEM (MS-DOS, remember ?). ZLIB does not support the unicode extensions, and every packer has another method to store unicode file names (unicode filenames as UTF-8 : Pkzip 4.5/Winzip 11.2 method, unicode filename in extra field : Info-Zip method, etc...).

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Sat Jul 23, 2011 9:44 am 
Offline
Addict
Addict

Joined: Thu Nov 01, 2007 5:37 pm
Posts: 1981
Location: Germany
gnozal wrote:
You may use PureZIP_SetCompressionAlgorithm() to choose between #Z_NO_COMPRESSION and #Z_DEFLATED.
As #Z_DEFLATED is so fast, PureZIP always uses #Z_BEST_COMPRESSION. There is no point using any other compression level.
Users (!) sometimes like to have control over something, even if it doesn't make sense in a programmers point of view. Please just add it to PureZIP_SetCompressionAlgorithm()... I would highly appreciate it!

gnozal wrote:
In a (PKZIP 2.04g) ZIP archive, the filenames are stored as OEM (MS-DOS, remember ?). ZLIB does not support the unicode extensions, and every packer has another method to store unicode file names (unicode filenames as UTF-8 : Pkzip 4.5/Winzip 11.2 method, unicode filename in extra field : Info-Zip method, etc...).
OK, but what does that mean for PureZIP? Is Unicode supported in some way?

As far as I remember Microsoft added Zip support to the Windows Explorer in XP. Was it possible to create Zip folders as well? If so, do you know how they managed this issue?

_________________
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Sat Jul 23, 2011 10:39 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
c4s wrote:
Users (!) sometimes like to have control over something, even if it doesn't make sense in a programmers point of view. Please just add it to PureZIP_SetCompressionAlgorithm()... I would highly appreciate it!
If you open a ZIP file with 7-ZIP and check the properties, you only get the algorithm (Deflate), but not the compression level. And if you want to create a ZIP file, you have 6 generic compression level options that do not have any meaning, as DEFLATE only has 2 levels (Z_BEST_SPEED and Z_BEST_COMPRESSION)!

So if the user is pleased with meaningless options, just add a trackbar that does nothing... as only 2 options may no satisfy him !

Anyway, I may add PureZIP_SetCompressionLevel() in a future version ... to please my users !
c4s wrote:
OK, but what does that mean for PureZIP? Is Unicode supported in some way?
The unicode version of PureZIP translates unicode to OEM and vice-versa. It works, but it is not 'true' unicode support...
c4s wrote:
As far as I remember Microsoft added Zip support to the Windows Explorer in XP. Was it possible to create Zip folders as well? If so, do you know how they managed this issue?
I have no idea. I only know that the genuine PKZIP 2.04g archive format does not support unicode, and that some modern archivers use a workaround to store unicode filenames (see my previous post).

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Sat Jul 23, 2011 12:20 pm 
Offline
Addict
Addict

Joined: Thu Nov 01, 2007 5:37 pm
Posts: 1981
Location: Germany
gnozal wrote:
If you open a ZIP file with 7-ZIP and check the properties, you only get the algorithm (Deflate), but not the compression level. And if you want to create a ZIP file, you have 6 generic compression level options that do not have any meaning, as DEFLATE only has 2 levels (Z_BEST_SPEED and Z_BEST_COMPRESSION)!

So if the user is pleased with meaningless options, just add a trackbar that does nothing... as only 2 options may no satisfy him !
Wikipedia about Deflate says: "Options range from -0 (do not attempt compression, just store uncompressed) to -9 representing the maximum capability of the reference implementation in zlib/gzip."

gnozal wrote:
Anyway, I may add PureZIP_SetCompressionLevel() in a future version ... to please my users !
I case it's not meant ironically, thank you. ;-)

gnozal wrote:
The unicode version of PureZIP translates unicode to OEM and vice-versa. It works, but it is not 'true' unicode support...
Thanks for explaining!

_________________
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Mon Jul 25, 2011 7:53 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
c4s wrote:
Wikipedia about Deflate says: "Options range from -0 (do not attempt compression, just store uncompressed) to -9 representing the maximum capability of the reference implementation in zlib/gzip."
There are two constants, #Z_BEST_SPEED = 1 and #Z_BEST_COMPRESSION = 9, so I guess values 2-8 are valid, never tried it though.
Anyway, it's the same problem : 9 ZLIB values, 6 compression level options in 7-ZIP, so no match between user input and ZLIB function reality.
c4s wrote:
I case it's not meant ironically, thank you.
See below..

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureZIP library : ZIP / UNZIP files [password supported]
PostPosted: Mon Jul 25, 2011 8:40 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Update (PB4.60 version)

Changes :
- new function : PureZIP_SetCompressionLevel()

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 600 posts ]  Go to page Previous  1 ... 35, 36, 37, 38, 39, 40  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye