memcpy cannot be used, because memory region may overlap (the behavior is undefined). copy must be made byte by byte.
Simple check with tgunzip:
- set UZLIB_CONF_USE_MEMCPY to 1
- set OUT_CHUNK_SIZE to 1024
- do not use ring buffer
- try decopress simple text file (
12341234123411111113333333). I attach test.gz
- tgunzip return
Error during decompression: -4 (TINF_CHKSUM_ERROR)
test.txt
test.gz
memcpy cannot be used, because memory region may overlap (the behavior is undefined). copy must be made byte by byte.
Simple check with tgunzip:
12341234123411111113333333). I attach test.gzError during decompression: -4(TINF_CHKSUM_ERROR)test.txt
test.gz