msix-packaging/lib/zlib/examples
Ruben Guerrero Samaniego 466e103501 Merged PR 1105689: Make zlib a subtree instead of a submodule
zlib 1.2.11 has a bug on its CMakeLists.txt file which is fix in a pull request opened 8 months ago which haven't been completed. It is possible to use git submodules to point to the commit of the pull request, but the build environment of VSO fails if we do this.

To fix this, zlib is now a git subtree instead of a git submodule. From git subtree --help "Subtrees allow subprojects to be included within a subdirectory of the main project... Subtrees are not to be confused with submodules, which are meant for the same task. Unlike submodules, subtrees do not need any special constructions (like .gitmodule files or gitlinks) be present in your repository, and do not force end-users of your repository to do anything special or to understand how subtrees work. A subtree is just a subdirectory that can be committed to, branched, and merged along with your project in any way you want." Git subtree basically copies the code in your repository, but we can commit the fix we require in our repo and later on do a git subtree pull and merge any subsequent version of zlib.
2017-11-15 19:13:55 +00:00
..
README.examples Merged PR 1105689: Make zlib a subtree instead of a submodule 2017-11-15 19:13:55 +00:00
enough.c Merged PR 1105689: Make zlib a subtree instead of a submodule 2017-11-15 19:13:55 +00:00
fitblk.c Merged PR 1105689: Make zlib a subtree instead of a submodule 2017-11-15 19:13:55 +00:00
gun.c Merged PR 1105689: Make zlib a subtree instead of a submodule 2017-11-15 19:13:55 +00:00
gzappend.c Merged PR 1105689: Make zlib a subtree instead of a submodule 2017-11-15 19:13:55 +00:00
gzjoin.c Merged PR 1105689: Make zlib a subtree instead of a submodule 2017-11-15 19:13:55 +00:00
gzlog.c Merged PR 1105689: Make zlib a subtree instead of a submodule 2017-11-15 19:13:55 +00:00
gzlog.h Merged PR 1105689: Make zlib a subtree instead of a submodule 2017-11-15 19:13:55 +00:00
zlib_how.html Merged PR 1105689: Make zlib a subtree instead of a submodule 2017-11-15 19:13:55 +00:00
zpipe.c Merged PR 1105689: Make zlib a subtree instead of a submodule 2017-11-15 19:13:55 +00:00
zran.c Merged PR 1105689: Make zlib a subtree instead of a submodule 2017-11-15 19:13:55 +00:00

README.examples

This directory contains examples of the use of zlib and other relevant
programs and documentation.

enough.c
    calculation and justification of ENOUGH parameter in inftrees.h
    - calculates the maximum table space used in inflate tree
      construction over all possible Huffman codes

fitblk.c
    compress just enough input to nearly fill a requested output size
    - zlib isn't designed to do this, but fitblk does it anyway

gun.c
    uncompress a gzip file
    - illustrates the use of inflateBack() for high speed file-to-file
      decompression using call-back functions
    - is approximately twice as fast as gzip -d
    - also provides Unix uncompress functionality, again twice as fast

gzappend.c
    append to a gzip file
    - illustrates the use of the Z_BLOCK flush parameter for inflate()
    - illustrates the use of deflatePrime() to start at any bit

gzjoin.c
    join gzip files without recalculating the crc or recompressing
    - illustrates the use of the Z_BLOCK flush parameter for inflate()
    - illustrates the use of crc32_combine()

gzlog.c
gzlog.h
    efficiently and robustly maintain a message log file in gzip format
    - illustrates use of raw deflate, Z_PARTIAL_FLUSH, deflatePrime(),
      and deflateSetDictionary()
    - illustrates use of a gzip header extra field

zlib_how.html
    painfully comprehensive description of zpipe.c (see below)
    - describes in excruciating detail the use of deflate() and inflate()

zpipe.c
    reads and writes zlib streams from stdin to stdout
    - illustrates the proper use of deflate() and inflate()
    - deeply commented in zlib_how.html (see above)

zran.c
    index a zlib or gzip stream and randomly access it
    - illustrates the use of Z_BLOCK, inflatePrime(), and
      inflateSetDictionary() to provide random access