Skip to content

Commit

Permalink
Remove unused debug code in Compress/Zstd*.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmilk committed Oct 5, 2021
1 parent a9e1808 commit 0f6bcfd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
24 changes: 0 additions & 24 deletions CPP/7zip/Compress/ZstdDecoder.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
// (C) 2016 - 2020 Tino Reichardt

#define DEBUG 0

#if DEBUG
#include <stdio.h>
#endif

#include "StdAfx.h"
#include "ZstdDecoder.h"

Expand Down Expand Up @@ -37,11 +31,6 @@ STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte * prop, UInt32 size)
{
DProps *pProps = (DProps *)prop;

#if DEBUG
printf("prop size =%u\n", size);
fflush(stdout);
#endif

switch (size) {
case 3:
memcpy(&_props, pProps, 3);
Expand Down Expand Up @@ -131,16 +120,6 @@ HRESULT CDecoder::CodeSpec(ISequentialInStream * inStream,
}
}

#if DEBUG
printf("res = %u\n", (unsigned)result);
printf("zIn.size = %u\n", (unsigned)zIn.size);
printf("zIn.pos = %u\n", (unsigned)zIn.pos);
printf("zOut.size = %u\n", (unsigned)zOut.size);
printf("zOut.pos = %u\n", (unsigned)zOut.pos);
printf("---------------------\n");
fflush(stdout);
#endif

/* write decompressed result */
if (zOut.pos) {
RINOK(WriteStream(outStream, _dstBuf, zOut.pos));
Expand Down Expand Up @@ -174,9 +153,6 @@ HRESULT CDecoder::CodeSpec(ISequentialInStream * inStream,
srcBufLen = _srcBufSize;
RINOK(ReadStream(inStream, _srcBuf, &srcBufLen));
_processedIn += srcBufLen;
#if DEBUG
printf("READ = %u\n", (unsigned)srcBufLen);
#endif

/* finished */
if (srcBufLen == 0)
Expand Down
17 changes: 0 additions & 17 deletions CPP/7zip/Compress/ZstdEncoder.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// (C) 2016 - 2020 Tino Reichardt

#if 0
#include <stdio.h>
#endif

#include "StdAfx.h"
#include "ZstdEncoder.h"
#include "ZstdDecoder.h"
Expand Down Expand Up @@ -372,19 +368,6 @@ STDMETHODIMP CEncoder::Code(ISequentialInStream *inStream,
}
}

#if 0
printf("err=%u ", (unsigned)err);
printf("srcSize=%u ", (unsigned)srcSize);
printf("todo=%u\n", ZSTD_todo);
printf("inBuff.size=%u ", (unsigned)inBuff.size);
printf("inBuff.pos=%u\n", (unsigned)inBuff.pos);
printf("outBuff.size=%u ", (unsigned)outBuff.size);
printf("outBuff.pos=%u\n\n", (unsigned)outBuff.pos);
printf("_processedIn=%u ", (unsigned)_processedIn);
printf("_processedOut=%u\n", (unsigned)_processedOut);
fflush(stdout);
#endif

/* write output */
if (outBuff.pos) {
RINOK(WriteStream(outStream, _dstBuf, outBuff.pos));
Expand Down

0 comments on commit 0f6bcfd

Please sign in to comment.