Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-11

ZLIB

6 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Rainer Stratmann

For a Webserver I need to create the png graphics format.

I want to use as little external components as possible.

Has someone experience with the zlib format or specification? Can it be used without allocating memory?
Or with a given memoryblock for operation?

I would like to prevent allocating memory and freeing memory all the times...

Michael Van Canneyt
to Rainer Stratmann
Rainer Stratmann wrote
For a Webserver I need to create the png graphics format. I want to use as little external components as possible.

What is wrong with the existing png reader ?

Michael.

Rainer Stratmann
to Michael Van Canneyt: What is wrong with the existing png reader ? Michael.
Michael Van Canneyt wrote 8 lines
On Mon, 8 Nov 2010, Rainer Stratmann wrote: > For a Webserver I need to create the png graphics format. > > I want to use as little external components as possible. What is wrong with the existing png reader ? Michael.

I don't know any bugs in the existing png reader.

My application is running in a critical environment. Also the webserver code I wrote completely myself. All with static memory. No dynamic allocating memory blocks. In these days memory is not the problem.
http://demo.klimaregelung.de
For showing measuring values I need png support.

Adriaan van Os
to Rainer Stratmann: For a Webserver I need to create the png graphics format. I want to use as little…
Rainer Stratmann wrote 7 lines
For a Webserver I need to create the png graphics format. I want to use as little external components as possible. Has someone experience with the zlib format or specification? Can it be used without allocating memory? Or with a given memoryblock for operation?

zlib's compress2 operates on memory blocks that you give it, but I am not sure whether it allocates temporary buffers. Note that I tried FPC's zlib but it crashed on Windows. Instead, on Windows, I am linking to

{$linklib Libs/mingw/libz.a}
{$linklib Libs/mingw/libmsvcrt.a}
{$linklib Libs/mingw/libgcc.a}

On the Mac, zlib is part of the system software.

Regards,

Adriaan van Os