[Implemented] zlib upgrade from V1.2.3 to 1.2.6
[Implemented] zlib upgrade from V1.2.3 to 1.2.6
Hello everyone,
The zlib currently available in PureBasic is the version 1.2.3 (18-07-2005). According to the [ur=http://zlib.net/l]zlib web site[/url] the last version is 1.2.6 (29-01-2012).
An almost 7 years outdated lib, maybe an upgrade it's not a luxury.
Best regards.
Guimauve
The zlib currently available in PureBasic is the version 1.2.3 (18-07-2005). According to the [ur=http://zlib.net/l]zlib web site[/url] the last version is 1.2.6 (29-01-2012).
An almost 7 years outdated lib, maybe an upgrade it's not a luxury.
Best regards.
Guimauve
Re: zlib upgrade from V1.2.3 to 1.2.6
-1
For what is this good? PB doesn't use anything from new version!
Better a old but stable version without problem, as a new one.
http://www.purebasic.fr/english/viewtop ... 56#p322056Fred wrote:From the zlib page: "Version 1.2.5 fixes bugs in gzseek() and gzeof() that were present in version 1.2.4 (March 2010). All users are encouraged to upgrade immediately. "
That's one of the reasons why we don't rush on new libs. You may be not know, but using a new version of a lib in PB isn't as easy as it seems. We can't update the whole third libs every now and then, we do it if a PB command is clearly affected with it, or when it's too old. Many (most) softwares still run perfectly with old libs, of course. That's not because a new version is released than older software suddenly stop working...
For what is this good? PB doesn't use anything from new version!
Better a old but stable version without problem, as a new one.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: zlib upgrade from V1.2.3 to 1.2.6
The zlib Adler32 function has also been improved, but not sure anybody uses that instead of crc32.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: zlib upgrade from V1.2.3 to 1.2.6
Sorry but I totally disagree about this. Pay attention, I don't ask to rush to upgrade all libraries the millisecond they are available but the zlib is almost not 7 minutes, 7 hours, 7 days, 7 weeks, 7 months but 7 YEARS late.ts-soft wrote:For what is this good? PB doesn't use anything from new version!
Better a old but stable version without problem, as a new one.
If I follow your logic, the V1.2.6 just arrive we don't rush to upgrade we let the to become mature. But by the time the PureBasic upgrade arrive a new version just arrive so the upgrade will be cancelled because the newer version, not the 1.2.6 but the 1.2.7 is not mature. Months pass, another time to upgrade, unfortunately it's a newer version, the V1.2.8 the upgrade is cancelled one more time.
In ten thousand years from now,
Fred wrote:Hey guys, I will upgrade the zlib, the version is now V10000000.2.9 I thinks is time to do it. AH ! to bad the newer version is out, the 10000000.3.0, sorry I will wait until this lib will become stable
Maybe an upgrade per year is fair.
Best regards.
Guimauve
Re: zlib upgrade from V1.2.3 to 1.2.6
The upgrade is for nothing good!
PB doesn't require this upgrade, if you require it, import the new lib
PB doesn't require this upgrade, if you require it, import the new lib

PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: zlib upgrade from V1.2.3 to 1.2.6
Ok suggesting a library upgrade it's bad idea.
Best regards anyway.
Guimauve
Best regards anyway.
Guimauve
Re: zlib upgrade from V1.2.3 to 1.2.6
This is not right. A upgrade of zlib, only internal used from pb is not a good idea,Guimauve wrote:Ok suggesting a library upgrade it's bad idea.
only if some of the PB libs requires this or a security issue.
A upgrade of SQLite3 is usefull. The pb-users can use new function in sql,
without using of API. This make sense
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: zlib upgrade from V1.2.3 to 1.2.6
I suggesting an update for the zlib because the internal Packer library based on jCalG1 allow compressing/decompressing data if the file is going stay on the same platform. If you want to create a compressed file on Windows and decompress it on Linux it didn't work. So, a library creating a compressed data file platform depend is completely useless. This is why I have re-created the Packer library using the zlib, see here : http://www.purebasic.fr/english/viewtop ... 12&t=46469
I already importing function from this library including the compressBound(UnCompressedLenght.l) function witch is know to be bugged in version 1.2.3 fixed in version 1.2.4 but this version has a serious bug so all people using it should upgrade again to V1.2.5. So I need to find the way my self to calculate the "compressBound" to allocate the proper memory block. It's very frustrating to re-invent the wheel just because the library is little bit out of date.
Anyway it up to Fred/Freak now.
Best regards.
Guimauve
I already importing function from this library including the compressBound(UnCompressedLenght.l) function witch is know to be bugged in version 1.2.3 fixed in version 1.2.4 but this version has a serious bug so all people using it should upgrade again to V1.2.5. So I need to find the way my self to calculate the "compressBound" to allocate the proper memory block. It's very frustrating to re-invent the wheel just because the library is little bit out of date.
Anyway it up to Fred/Freak now.
Best regards.
Guimauve
Re: zlib upgrade from V1.2.3 to 1.2.6
So, just replace the lib. I dont see the problem.
Re: zlib upgrade from V1.2.3 to 1.2.6
Can someone tell me if this lib is used by PureBasic some how ?Thorium wrote:So, just replace the lib. I dont see the problem.
I don't want to screwed up the PNG Encoder/Decoder just to be able to compress files and data.
Best regards.
Guimauve
Re: zlib upgrade from V1.2.3 to 1.2.6
It's only used for encoding and decoding PNG files. It should be replaceable without a problem.Guimauve wrote: Can someone tell me if this lib is used by PureBasic some how ?
Re: zlib upgrade from V1.2.3 to 1.2.6
upgrading your libs is not only about new functions but also about bugs fix, better performances and security issues.ts-soft wrote:-1http://www.purebasic.fr/english/viewtop ... 56#p322056Fred wrote:From the zlib page: "Version 1.2.5 fixes bugs in gzseek() and gzeof() that were present in version 1.2.4 (March 2010). All users are encouraged to upgrade immediately. "
That's one of the reasons why we don't rush on new libs. You may be not know, but using a new version of a lib in PB isn't as easy as it seems. We can't update the whole third libs every now and then, we do it if a PB command is clearly affected with it, or when it's too old. Many (most) softwares still run perfectly with old libs, of course. That's not because a new version is released than older software suddenly stop working...
For what is this good? PB doesn't use anything from new version!
Better a old but stable version without problem, as a new one.
as you can see here, zlib got a lot of changes since 1.2.3
Re: zlib upgrade from V1.2.3 to 1.2.6
And this is why it's not a good idea to wait very long before to upgrade a library. The work load can become tremendous. It my point of view about this.xorc1zt wrote:as you can see here, zlib got a lot of changes since 1.2.3
By the way, I have create a patch to avoid the use of bugged command from the V1.2.3
Code: Select all
CompressedBufferSize = (Int(1.1 * UnCompressedBufferSize) + 12)
Best regards
Guimauve
Last edited by Guimauve on Wed Feb 22, 2012 9:14 pm, edited 2 times in total.
Re: zlib upgrade from V1.2.3 to 1.2.6
Hi Guimauve,
0.1% = 1.001
0.1% = 1.001

Code: Select all
CompressedLength = Round(1.001 * UnCompressedLength,#PB_Round_Up) + 12
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum