PBZip Beta

Developed or developing a new product in PureBasic? Tell the world about it.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

I guess that is the best method to retrieve a list, but you could include extra info on the command...

Something like:

ZipGetFile(filenumber[,flags])

where flags would be:
#Zname
#Zsize
#Zdate
#Zdir
#Zfileattr

etc...
DominiqueB
Enthusiast
Enthusiast
Posts: 103
Joined: Fri Apr 25, 2003 4:00 pm
Location: France

OK

Post by DominiqueB »

All works well now, thank's.

Dominique.
Dominique

Windows 10 64bits. Pure basic 32bits
spangly
User
User
Posts: 54
Joined: Mon Apr 28, 2003 8:26 pm
Contact:

Post by spangly »

Num3 wrote:I guess that is the best method to retrieve a list, but you could include extra info on the command...

Something like:

ZipGetFile(filenumber[,flags])

where flags would be:
#Zname
#Zsize
#Zdate
#Zdir
#Zfileattr

etc...
what about a function that you pass a structure to, and that fills it in with the file details?
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

how about the same way ExamineDirectory() works;

ExamineZip()
NextZipEntry()

a structure works too, which ever seams best.
spangly
User
User
Posts: 54
Joined: Mon Apr 28, 2003 8:26 pm
Contact:

Post by spangly »

I've implented the structure version, it's online now
DominiqueB
Enthusiast
Enthusiast
Posts: 103
Joined: Fri Apr 25, 2003 4:00 pm
Location: France

Hi

Post by DominiqueB »

All is ok.
What is a "20" meaning as a file attribute ?

You could build a resident file to put the constants and structure ?
Then the user doesn't have to write it.

Thank's
Dominique.
Dominique

Windows 10 64bits. Pure basic 32bits
spangly
User
User
Posts: 54
Joined: Mon Apr 28, 2003 8:26 pm
Contact:

Post by spangly »

I'll create a resident file for the next version

As for the fille attribute question, file attributes in a zip file are a 32bit integer used by whatever operating system the zip file was created on.

If it was created under windows, then it is the value returned by the winapi function GetFileAttributes_("filename")

I'll alter the function so that if the zip wasn't created under windows, the file attribute will be zero or -1 or something invalid.
spangly
User
User
Posts: 54
Joined: Mon Apr 28, 2003 8:26 pm
Contact:

PBZip 0.04

Post by spangly »

New version available, check the readme and examples.
There will be a better help file for it once I'm happy with how it all works.
Includes a PBZip.res file now :lol: and it's a lot more stable.

Here's a list of functions available in this version...

ZipSetProgressCallback
ZipOpen
ZipClose
ZipGetFileName
ZipExtractFile
ZipFindFile
ZipExtractFileName
ZipGetFileInfo
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

You seam to have done your homework pretty well, it's being used currently by a cd databasing software, scanning the zip for files and storing them, it's processed 10's of 1000's of zip files without problem.
spangly
User
User
Posts: 54
Joined: Mon Apr 28, 2003 8:26 pm
Contact:

Post by spangly »

Inner wrote:You seam to have done your homework pretty well, it's being used currently by a cd databasing software, scanning the zip for files and storing them, it's processed 10's of 1000's of zip files without problem.
Thanks for the positive feedback! I haven't had any reports of problems so far, so I'm working on the creation of zip files now. and will hopefully have a version working in the next few days.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Excellent work!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
spangly
User
User
Posts: 54
Joined: Mon Apr 28, 2003 8:26 pm
Contact:

PBZip 1.00 Released...

Post by spangly »

PBZip 1.00 is now released, grab it from my site.

It's a complete rewrite, should now be more compatible with most (if not all) Zip Archives.

Some of the functions have changed, and you can now Create and add files to Archives.

Happy Zipping!
spangly
User
User
Posts: 54
Joined: Mon Apr 28, 2003 8:26 pm
Contact:

Post by spangly »

Thanks to karbon, I now have a permanent place for my PB stuff :D
So If you want to grab the new improved PBZip 1.0 head over to this URL

http://spangly.purebasic.org
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1285
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

I am curious why a message box pops up when I try to create a new zip archive and add a file to it using your Zip Lib?

Message box says...
Title: Info
Message: Here


Also after creating a ZIP archive using your Lib, if I open it and use ZipGetFileInfo() the date returned is always 00/00/
Image Image
spangly
User
User
Posts: 54
Joined: Mon Apr 28, 2003 8:26 pm
Contact:

Post by spangly »

I've removed the message box, it was left over from when I was
debugging a crash and forgot to remove it.
It should now store the correct file date and time when adding files.

The new version is online now.
Post Reply