From 753415032619f70d5fb6cd06555f4c1ffb22dbc1 Mon Sep 17 00:00:00 2001 From: Pin Date: Mon, 11 Oct 2021 23:48:52 -0400 Subject: [PATCH] code atrib --- include/CRCLib.h | 4 ++++ src/compress_util.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/include/CRCLib.h b/include/CRCLib.h index 39530ff..f451ffb 100644 --- a/include/CRCLib.h +++ b/include/CRCLib.h @@ -1,3 +1,7 @@ +/* + * Code Implemented From: https://www.w3.org/TR/PNG/#D-CRCAppendix +*/ + /* Table of CRCs of all 8-bit messages. */ unsigned long crc_table[256]; diff --git a/src/compress_util.c b/src/compress_util.c index ebf3663..9407c8a 100644 --- a/src/compress_util.c +++ b/src/compress_util.c @@ -6,6 +6,9 @@ #define CHUNK 1024 +/* + * Built from exmaple provided in: https://zlib.net/zlib_how.html +*/ void zlib_decompress_data(unsigned char *data_chunk, size_t file_length, unsigned char **buff, size_t *sz) { int ret; unsigned int have; @@ -68,6 +71,9 @@ void zlib_decompress_data(unsigned char *data_chunk, size_t file_length, unsigne fclose(of); } +/* + * Built from exmaple provided in: https://zlib.net/zlib_how.html +*/ void zlib_compress_data(unsigned char *data_chunk, size_t file_length, unsigned char **buff, size_t *sz) { int ret, flush; unsigned int have;