-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9560a0a
commit 3172e9f
Showing
6 changed files
with
67 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// example1.c - Demonstrates miniz.c's compress() and uncompress() functions (same as zlib's). | ||
// Public domain, May 15 2011, Rich Geldreich, [email protected] | ||
// Public domain, May 15 2011, Rich Geldreich, [email protected]. See "unlicense" statement at the end of tinfl.c. | ||
#include "miniz.c" | ||
|
||
typedef unsigned char uint8; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// example2.c - Simple demonstration of miniz.c's ZIP archive API's. | ||
// Public domain, May 15 2011, Rich Geldreich, [email protected] | ||
// Public domain, May 15 2011, Rich Geldreich, [email protected]. See "unlicense" statement at the end of tinfl.c. | ||
#include "miniz.c" | ||
|
||
typedef unsigned char uint8; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// example3.c - Demonstrates how to use miniz.c's deflate() and inflate() functions for simple file compression. | ||
// Public domain, May 15 2011, Rich Geldreich, [email protected] | ||
// Public domain, May 15 2011, Rich Geldreich, [email protected]. See "unlicense" statement at the end of tinfl.c. | ||
// For simplicity, this example is limited to files smaller than 4GB, but this is not a limitation of miniz.c. | ||
#include "miniz.c" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// example4.c - Uses tinfl.c to decompress a zlib stream in memory to an output file | ||
// Public domain, May 15 2011, Rich Geldreich, [email protected] | ||
// Public domain, May 15 2011, Rich Geldreich, [email protected]. See "unlicense" statement at the end of tinfl.c. | ||
#include "tinfl.c" | ||
#include <stdio.h> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/* miniz.c v1.10 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing | ||
Rich Geldreich <[email protected]>, last updated May 20, 2011 | ||
/* miniz.c v1.11 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing | ||
See "unlicense" statement at the end of this file. | ||
Rich Geldreich <[email protected]>, last updated May 27, 2011 | ||
Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt | ||
Most API's defined in miniz.c are optional. For example, to disable the archive related functions just define | ||
|
@@ -14,6 +15,7 @@ | |
Refactored the compression code for better readability and maintainability. | ||
Added level 10 compression level (L10 has slightly better ratio than level 9, but could have a potentially large | ||
drop in throughput on some files). | ||
May 28, v1.11 - Added statement from unlicense.org | ||
* Deflate/Inflate implementation notes: | ||
|
@@ -200,11 +202,11 @@ enum { MZ_DEFAULT_STRATEGY = 0, MZ_FILTERED = 1, MZ_HUFFMAN_ONLY = 2, MZ_RLE = 3 | |
|
||
#ifndef MINIZ_NO_ZLIB_APIS | ||
|
||
#define MZ_VERSION "9.1.10" | ||
#define MZ_VERNUM 0x91A0 | ||
#define MZ_VERSION "9.1.11" | ||
#define MZ_VERNUM 0x91B0 | ||
#define MZ_VER_MAJOR 9 | ||
#define MZ_VER_MINOR 1 | ||
#define MZ_VER_REVISION 10 | ||
#define MZ_VER_REVISION 11 | ||
#define MZ_VER_SUBREVISION 0 | ||
|
||
// Flush values. For typical usage you only need MZ_NO_FLUSH and MZ_FINISH. The other stuff is for advanced use. | ||
|
@@ -4648,3 +4650,30 @@ void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char | |
#endif | ||
|
||
#endif // MINIZ_HEADER_FILE_ONLY | ||
|
||
/* | ||
This is free and unencumbered software released into the public domain. | ||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
For more information, please refer to <http://unlicense.org/> | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/* tinfl.c v1.10 - public domain inflate with zlib header parsing/adler32 checking (inflate-only subset of miniz.c) | ||
/* tinfl.c v1.11 - public domain inflate with zlib header parsing/adler32 checking (inflate-only subset of miniz.c) | ||
See "unlicense" statement at the end of this file. | ||
Rich Geldreich <[email protected]>, last updated May 20, 2011 | ||
Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt | ||
|
@@ -554,3 +555,30 @@ int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, | |
} | ||
|
||
#endif // #ifndef TINFL_HEADER_FILE_ONLY | ||
|
||
/* | ||
This is free and unencumbered software released into the public domain. | ||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
For more information, please refer to <http://unlicense.org/> | ||
*/ |