Static zlib library file.

General FreeBASIC programming questions.
Post Reply
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Static zlib library file.

Post by dodicat »

wxwidgets produces a static zlib compression library file.
For any one interested here it is with a Windows usage examples.
http://www.mediafire.com/file/ymot95r35 ... mpress.zip
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Static zlib library file.

Post by St_W »

That is just the usual zlib specifically built for the use with wxWidgets. Better use the original zlib and the headers that ship already with FB.
Building zlib is really dead easy, it build both the static library and a dynamic library by default. Anyway, if one prefers to get a prebuilt library instead there are a lot of links on the forums, for example in this thread are at least three: https://freebasic.net/forum/viewtopic.php?f=2&t=25704
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Static zlib library file.

Post by dodicat »

I see the page stw builds (I presume that is yourself).
additional_libs
You have done alot of work here.
But it is hidden from beginners.
Why can't access to those and other libraries be reached from the home page?

If I remember, at one time a while ago, a library page was available.
Thank's for the reply.
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Static zlib library file.

Post by St_W »

dodicat wrote:I see the page stw builds (I presume that is yourself).
additional_libs
You have done alot of work here.
But it is hidden from beginners.
Why can't access to those and other libraries be reached from the home page?
If I remember, at one time a while ago, a library page was available.
Thank's for the reply.
Yes, that's me, but there are also builds by other users in that thread or other threads. (btw I rather had this one in mind: http://users.freebasic-portal.de/stw/fi ... b-1211.zip ) Actually I haven't done a lot as those libraries are shipped with the mingw-w64 toolchains. I agree that beginners probably can't find that one or other builds. The wiki page ( https://freebasic.net/wiki/wikka.php?wakka=ExtLibzlib ) doesn't mention where to get a compiled library, probably because that would be quite some work to maintain it and keeping it up-to-date. Yes there has been some code archive years ago which has been set to read-only long time ago and seems to have fully disappeared nowadays. I don't know why, but probably it was removed due to lack of maintenance especially from a security point of view.
Providing some place to share libraries isn't as simple as it my seem on the first sight. You need some categorization, tagging and description so that users can actually find libraries. You have to check uploads so that no spam or viruses are uploaded. The packages should follow some common structure to simplify their usage. They need to be provided for different operating systems and platforms (or at least marked which ones are compatible). ...
Somebody would have to actually implement such a website (which is probably already quite some work) and then people would have to maintain it and fill it with content (which means again quite some work).

Basically I'm with you - I'd also like to have such a system - but somebody has to have the knowledge, time & willingness to actually do it.
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Static zlib library file.

Post by jj2007 »

I've been searching for years to find a lightweight zip library. There is no ideal solution, but LiteZip by Jeff Glatt is worth a look (I just see that José Roca translated the headers). Both LiteZip.dll and LiteUnzip.dll are around 40kBytes. Only TinfLib by jibz is smaller, at 6924 bytes for the tinfunzip.lib

Another option is to assume that the user has 7-zip installed, and to use its DLLs.
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Static zlib library file.

Post by St_W »

jj2007 wrote:I've been searching for years to find a lightweight zip library. [...]
Note that zlib only implements the compression/uncompression and not the zip file format. You can't unzip .zip files with that library alone. There's libzip (which depends on zlib) to provide the zip-file support.
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

Re: Static zlib library file.

Post by srvaldez »

the zlib1.dll 32-bit by St_W is only about 117k but has a dependency on libgcc_s_dw2-1.dll however only the function __register_frame_info is imported and if that function is linked-in thereby eliminating the dependency the size is only 118k, when upx compressed the size is only 55k.
[edit] darn spelling auto-correct, upx->ups
Last edited by srvaldez on Aug 29, 2017 20:59, edited 1 time in total.
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Static zlib library file.

Post by dodicat »

srvaldez
Do you use dependency walker?
I cannot get it working on Win 10.

libgcc_s_dw2-1.dll rears it's ugly head once more I see.

Useless eh!, cannot even add up two quad floats!
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Static zlib library file.

Post by jj2007 »

St_W wrote:
jj2007 wrote:I've been searching for years to find a lightweight zip library. [...]
Note that zlib only implements the compression/uncompression and not the zip file format. You can't unzip .zip files with that library alone. There's libzip (which depends on zlib) to provide the zip-file support.
Check LiteZip then, it imports only Kernel32 and User32 functions. For my own stuff, I use Joergen Ibsen's tinf, extremely compact but unzipping only.
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

Re: Static zlib library file.

Post by srvaldez »

dodicat wrote:srvaldez
Do you use dependency walker?
for 32-bit dll's and exe's I use eXeScope a discontinued utility that works quite well but is 32-bit only, for 64-bit files I use dependency walker.
about your problem with quad float, I am not sure what the problem is but the dll's I first made and posted a link in the library section had a dependency on a certain version of msvcrt.dll which is needed for operation, I have since recompiled the dll's linking to the static msvcrt and re-uploded them.
St_W
Posts: 1626
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Static zlib library file.

Post by St_W »

srvaldez wrote:the zlib1.dll 32-bit by St_W is only about 117k but has a dependency on libgcc_s_dw2-1.dll
thanks for the hint, I haven't noticed that. While I didn't really care about the size the dependency on that mingw DLL is a bad thing. So using the wxWidgets build would be better in that case actually. :-)
I guess they are using a Microsoft compiler (MSVC) to compile? usually that creates smaller binaries and less dependencies (or at least dependencies on typical Windows libraries instead of unix-like stuff).
Post Reply