Page 2 of 2

Re: minizip lib

Posted: Mon Jan 09, 2012 11:35 pm
by jamba
this is great! thanks ts-soft.

A couple of questions...
what language is your minizip.lib written in? C?
Also, in the event you no longer support this would you release the source to the lib?

Re: minizip lib

Posted: Tue Jan 10, 2012 6:22 am
by ts-soft
The source for the static lib is here available.
The PureBasic Source to use this static lib is in the downloadpackage.

Re: minizip lib

Posted: Tue Jan 10, 2012 3:28 pm
by jamba
ts-soft wrote:The source for the static lib is here available.
The PureBasic Source to use this static lib is in the downloadpackage.
you are the man, thanks!

Re: minizip lib

Posted: Mon Jul 02, 2012 8:56 am
by shire
Hello,

Is there a library for linux which is something like this?

Thanks.

Re: minizip lib

Posted: Mon Jul 30, 2012 4:01 pm
by jassing
I have come back to a project to make changes, it was originally done in an earlier version of PB - using the latest, I get:

POLINK: error: Unresolved external symbol 'SYS_AllocateString'.
POLINK: error: Unresolved external symbol 'PB_CallFunctionFast2'.
POLINK: fatal error: 2 unresolved external(s).

any ideas? or is the lib not compatible with 4.61?

Re: minizip lib

Posted: Mon Jul 30, 2012 4:15 pm
by ts-soft
Use the includefile, the userlib is not up to date!
Or use tailbite to create a userlib.

Re: minizip lib

Posted: Mon Jul 30, 2012 7:43 pm
by jassing
ts-soft wrote:Use the includefile, the userlib is not up to date!
Or use tailbite to create a userlib.

Thanks! That did it.

Re: minizip lib

Posted: Mon Feb 11, 2013 5:54 pm
by ts-soft
Update

Bugfix-Release:
fixed division by zero error
fixed nullbyte files not extracted
fixed examples static lib not found

Re: minizip lib

Posted: Wed Apr 10, 2013 3:19 am
by ricardo
I tried this to add a folder

Code: Select all

IncludePath "..\"
XIncludeFile "minizip_include.pbi"

Define.s zip
zip = "H:\ABC\test.zip"

Define ff = ZIP_FileCreate(zip.s)
If ff
  ZIP_DirAdd(ff,"H:\ABC\ABC\",#Z_DEFAULT_COMPRESSION,0)
  ZIP_FileClose(ff)
EndIf

But i get "division by zero forbidden".

Any advice?

Re: minizip lib

Posted: Wed Apr 10, 2013 2:20 pm
by ts-soft
You are using the latest version as include?
The debugger doesn't show the line with division by zero?
The dir for packing is empty?

Okay, i have added blind some sanitycheck, please download the latest version.

Greetings - Thomas

Re: minizip lib

Posted: Sun Mar 06, 2016 7:17 pm
by Michael Vogel
Since purebasic has "lost" some important zip functionality (e.g. adding a file to a packed file), I searched for an alternative - and minizip looks really good (thank you, Thomas).

I would recommend to update the pbi file to be usable for the latest versions of Purebasic, I changed the three CRC32Fingerprint() and CRC32FileFingerprint() calls and added the following lines to the code...

Code: Select all

	:
	CompilerIf #PB_Compiler_Version<540

		Macro Fingerprint(source,size,dummy)
			CRC32Fingerprint(source,size)
		EndMacro
		Macro FileFingerprint(file,dummy)
			CRC32FileFingerprint(file)
		EndMacro

	CompilerElse
		UseCRC32Fingerprint()

	CompilerEndIf

	:

	result= ... #Z_DEFLATED,Compression,0,15,8,0,ZIP_Password,FileFingerprint(Filename,#PB_Cipher_CRC32))
	result= ... #Z_DEFLATED,Compression,0,15,8,0,ZIP_Password,FileFingerprint(ZIP_FileList(),#PB_Cipher_CRC32))
	result= ... #Z_DEFLATED,Compression,0,15,8,0,ZIP_Password,Fingerprint(*source,sourceLen,#PB_Cipher_CRC32))

	: