v>
However, this is a well-known problem so if that is not what you fou=
nd on stackoverflow or what have you, it may not be that.
--00000000000038250f05b86e279e--
--===============8659673439573246793==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============8659673439573246793==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
png-mng-implement mailing list
png-mng-implement-at-lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
--===============8659673439573246793==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Hangout mailing list
Hangout-at-nylxs.com
http://lists.mrbrklyn.com/mailman/listinfo/hangout
--===============8659673439573246793==--
--===============8659673439573246793==
Content-Type: multipart/alternative; boundary="00000000000038250f05b86e279e"
--00000000000038250f05b86e279e
Content-Type: text/plain; charset="UTF-8"
On Sat, 9 Jan 2021 at 10:44, David Horman
wrote:
>
> Now I want to directly use zlib in my project to compress some data -
> nothing to do with PNGs - but I'm having trouble. I'm following the zlib
> 1.2.11 manual, but whenever I try to deflateInit(...) or compress(...) I
> get a return value of Z_STREAM_ERROR - this despite the fact that I'm
> copy and pasting code directly from examples and tutorials. I found a
> zlib example VS project online which directly compiles some zlib source
> code into itself, and the code in question works fine in that project.
>
The most likely culprit if you are copying and pasting code from examples
(it may not be the actual problem but the most likely culprit) is that when
you opened the file with fopen or whatever, you didn't open it in binary
mode, and Windows is translating the \n to \r\n or what have you.
When you use fopen on Windows you need to add a "b" at the end of the
"mode" argument to make sure that Windows opens it in binary mode.
However, this is a well-known problem so if that is not what you found on
stackoverflow or what have you, it may not be that.
--00000000000038250f05b86e279e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
Now I want to directly use zlib in my project to compress some data -
nothing to do with PNGs - but I'm having trouble. I'm following the=
zlib
1.2.11 manual, but whenever I try to deflateInit(...) or compress(...) I r>
get a return value of Z_STREAM_ERROR - this despite the fact that I'm <=
br>
copy and pasting code directly from examples and tutorials. I found a
zlib example VS project online which directly compiles some zlib source
>
code into itself, and the code in question works fine in that project.
<=
/blockquote>
The most likely culprit if you are copying =
and pasting code from examples (it may not be the actual problem but the mo=
st likely culprit) is that when you opened the file with fopen or whatever,=
you didn't open it in binary mode, and Windows is translating the \n t=
o \r\n or what have you.
When you use fopen on Win=
dows you need to add a "b" at the end of the "mode" arg=
ument to make sure that Windows opens it in binary mode.
v>
However, this is a well-known problem so if that is not what you fou=
nd on stackoverflow or what have you, it may not be that.
--00000000000038250f05b86e279e--
--===============8659673439573246793==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============8659673439573246793==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
png-mng-implement mailing list
png-mng-implement-at-lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
--===============8659673439573246793==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Hangout mailing list
Hangout-at-nylxs.com
http://lists.mrbrklyn.com/mailman/listinfo/hangout
--===============8659673439573246793==--