Recent

Author Topic: ZLib on MAC  (Read 413 times)

comdora

  • New Member
  • *
  • Posts: 10
ZLib on MAC
« on: July 09, 2022, 06:01:23 pm »
Hello everyone,
wondering if anyone has done ZLIB compression on a MAC using freepascal and Lazarus? If so, can you direct me to the component, or to the library from which to read? I found about jcl and bzip2lib, but it only applies to Windows and Linux.
Thank you so much.

comdora

  • New Member
  • *
  • Posts: 10
Re: ZLib on MAC
« Reply #1 on: July 09, 2022, 10:52:06 pm »
It looks like I need to import independently from the libz.1.dylib library. That there is no already imported support for pascal on MAC.

wp

  • Hero Member
  • *****
  • Posts: 10060
Re: ZLib on MAC
« Reply #2 on: July 10, 2022, 12:31:24 am »
In my "Lazarus Mailinglist Reader" (https://sourceforge.net/p/wp-laz/code/HEAD/tree/Lazarus%20MailingList%20Reader/), gzip-compressed mails are read by routines published at https://www.gocher.me/GZIP (in German, but the code comments are in English). Just tested my application on a VM with macOC, and it is working fine, i.e. the gz files are read correctly. Based on FCL's PasZLib.

comdora

  • New Member
  • *
  • Posts: 10
Re: ZLib on MAC
« Reply #3 on: July 10, 2022, 12:37:27 pm »
Hi wp,
thanks for your answer.

Unfortunately for me, it's only a partially converted zlib library content. There are some very important methods missing that I also need.
I couldn't even import them directly, but I have to recode them myself, based on the zlib source, which is open source.

When trying to import from the library, I get a linker error, that it is not compiled for x86_64.

But by all means thanks for trying to help me.

Bojan

wp

  • Hero Member
  • *****
  • Posts: 10060
Re: ZLib on MAC
« Reply #4 on: July 10, 2022, 12:53:09 pm »
Unfortunately for me, it's only a partially converted zlib library content. There are some very important methods missing that I also need.
I couldn't even import them directly, but I have to recode them myself, based on the zlib source, which is open source.

When trying to import from the library, I get a linker error, that it is not compiled for x86_64.
I'm not a zlib expert, so I can't help any further. But when you are sure that the implementation in PasZLib is incomplete, write a bug report, describe your issue there, and list the missing function. Many developers do not read the forum posts.

This is the link to the fpc bug tracker: https://gitlab.com/freepascal.org/fpc/source/-/issues
« Last Edit: July 10, 2022, 12:54:58 pm by wp »

Seenkao

  • Sr. Member
  • ****
  • Posts: 412
    • New ZenGL.
Re: ZLib on MAC
« Reply #5 on: July 10, 2022, 03:46:32 pm »
Я делал, смотрите здесь. Именно для x86_64. Как мне сообщили я это делал зря. MacOS уже содержит в себе необходимые библиотеки, вы можете их использовать.

Eng:
I did, see here. Exactly for x86_64. As I was told, I did it in vain. MacOS already contains the necessary libraries, you can use them.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.
Работаю над ZenGL.
Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL. :)

 

TinyPortal © 2005-2018