From 0278ae71deeb74eef927a606b410632a43900b5c Mon Sep 17 00:00:00 2001 From: pionere Date: Mon, 18 Apr 2022 10:50:04 +0200 Subject: get rid of nChCode --- src/pklib/implode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/pklib/implode.c') diff --git a/src/pklib/implode.c b/src/pklib/implode.c index 1484ee2..7aabbd8 100644 --- a/src/pklib/implode.c +++ b/src/pklib/implode.c @@ -599,7 +599,6 @@ unsigned int PKEXPORT implode( unsigned int *dsize) { TCmpStruct * pWork = (TCmpStruct *)work_buf; - unsigned int nChCode; unsigned int nCount; unsigned int i; int nCount2; @@ -638,11 +637,10 @@ unsigned int PKEXPORT implode( switch(*type) { case CMP_BINARY: // We will compress data with binary compression type - for(nChCode = 0, nCount = 0; nCount < 0x100; nCount++) + for(nCount = 0; nCount < 0x100; nCount++) { pWork->nChBits[nCount] = 9; - pWork->nChCodes[nCount] = (unsigned short)nChCode; - nChCode = (nChCode & 0x0000FFFF) + 2; + pWork->nChCodes[nCount] = nCount * 2; } break; -- cgit v1.2.3 From f8a9f6d9afa212397c29315070fdd14f3ee05719 Mon Sep 17 00:00:00 2001 From: pionere Date: Mon, 18 Apr 2022 10:54:41 +0200 Subject: remove incorrect notes --- src/pklib/explode.c | 1 - src/pklib/implode.c | 1 - 2 files changed, 2 deletions(-) (limited to 'src/pklib/implode.c') diff --git a/src/pklib/explode.c b/src/pklib/explode.c index 31480df..1ee31fd 100644 --- a/src/pklib/explode.c +++ b/src/pklib/explode.c @@ -479,7 +479,6 @@ unsigned int PKEXPORT explode( TDcmpStruct * pWork = (TDcmpStruct *)work_buf; // Initialize work struct and load compressed data - // Note: The caller must zero the "work_buff" before passing it to explode pWork->read_buf = read_buf; pWork->write_buf = write_buf; pWork->param = param; diff --git a/src/pklib/implode.c b/src/pklib/implode.c index 7aabbd8..96baf98 100644 --- a/src/pklib/implode.c +++ b/src/pklib/implode.c @@ -604,7 +604,6 @@ unsigned int PKEXPORT implode( int nCount2; // Fill the work buffer information - // Note: The caller must zero the "work_buff" before passing it to implode pWork->read_buf = read_buf; pWork->write_buf = write_buf; pWork->dsize_bytes = *dsize; -- cgit v1.2.3