src: rename membuffer "Uncompression" to "Decompression"

This commit is contained in:
Markus F.X.J. Oberhumer
2022-10-28 10:34:31 +02:00
parent 29762a8a96
commit e0bf460993
14 changed files with 29 additions and 21 deletions
+5 -1
View File
@@ -262,7 +262,7 @@ static bool check_zlib(const int method, const int level, const unsigned expecte
u_buf.alloc(u_len);
memset(u_buf, 0, u_len);
c_buf.allocForCompression(u_len, c_extra);
d_buf.allocForUncompression(u_len);
d_buf.allocForDecompression(u_len);
c_len = c_buf.getSize() - c_extra;
r = upx_zlib_compress(u_buf, u_len, c_buf + c_extra, &c_len, nullptr, method, level, NULL_cconf, &cresult);
@@ -273,6 +273,10 @@ static bool check_zlib(const int method, const int level, const unsigned expecte
if (r != 0 || d_len != u_len) return false;
if (memcmp(u_buf, d_buf, u_len) != 0) return false;
d_len = u_len - 1;
r = upx_zlib_decompress(c_buf + c_extra, c_len, d_buf, &d_len, method, nullptr);
if (r == 0) return false;
// TODO: rewrite Packer::findOverlapOverhead() so that we can test it here
//unsigned x_len = d_len;
//r = upx_zlib_test_overlap(c_buf, u_buf, c_extra, c_len, &x_len, method, nullptr);