X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flibchdr%2Fdeps%2Fzlib-1.3.1%2Fexamples%2Fzlib_how.html;fp=deps%2Flibchdr%2Fdeps%2Fzlib-1.2.13%2Fexamples%2Fzlib_how.html;h=43271b988a724d5e41b1c8335c8c22cc3a810346;hb=648db22b0750712da893c306efcc8e4b2d3a4e3c;hp=444ff1c9a32e8530f5f4cffe29ad51be4366c39b;hpb=e2fb1389dc12376acb84e4993ed3b08760257252;p=pcsx_rearmed.git diff --git a/deps/libchdr/deps/zlib-1.2.13/examples/zlib_how.html b/deps/libchdr/deps/zlib-1.3.1/examples/zlib_how.html similarity index 96% rename from deps/libchdr/deps/zlib-1.2.13/examples/zlib_how.html rename to deps/libchdr/deps/zlib-1.3.1/examples/zlib_how.html index 444ff1c9..43271b98 100644 --- a/deps/libchdr/deps/zlib-1.2.13/examples/zlib_how.html +++ b/deps/libchdr/deps/zlib-1.3.1/examples/zlib_how.html @@ -1,10 +1,10 @@ - + zlib Usage Example - +

zlib Usage Example

@@ -17,7 +17,7 @@ from an input file to an output file using deflate() and inflate()< annotations are interspersed between lines of the code. So please read between the lines. We hope this helps explain some of the intricacies of zlib.

-Without further adieu, here is the program zpipe.c: +Without further ado, here is the program zpipe.c:


 /* zpipe.c: example of proper use of zlib's inflate() and deflate()
    Not copyrighted -- provided to the public domain
@@ -155,13 +155,11 @@ before we fall out of the loop at the bottom.
 
We start off by reading data from the input file. The number of bytes read is put directly into avail_in, and a pointer to those bytes is put into next_in. We also -check to see if end-of-file on the input has been reached. If we are at the end of file, then flush is set to the +check to see if end-of-file on the input has been reached using feof(). +If we are at the end of file, then flush is set to the zlib constant Z_FINISH, which is later passed to deflate() to -indicate that this is the last chunk of input data to compress. We need to use feof() -to check for end-of-file as opposed to seeing if fewer than CHUNK bytes have been read. The -reason is that if the input file length is an exact multiple of CHUNK, we will miss -the fact that we got to the end-of-file, and not know to tell deflate() to finish -up the compressed stream. If we are not yet at the end of the input, then the zlib +indicate that this is the last chunk of input data to compress. +If we are not yet at the end of the input, then the zlib constant Z_NO_FLUSH will be passed to deflate to indicate that we are still in the middle of the uncompressed data.

@@ -540,6 +538,12 @@ int main(int argc, char **argv) }


-Copyright (c) 2004, 2005 by Mark Adler
Last modified 11 December 2005
+Last modified 24 January 2023
+Copyright © 2004-2023 Mark Adler

+ +Creative Commons License + +Creative Commons Attribution-NoDerivatives 4.0 International License.