Comments (6)
I am not sure it this is the right fix:
diff --git a/programs/fileio.c b/programs/fileio.c
index e84d633..9aa5bf2 100644
--- a/programs/fileio.c
+++ b/programs/fileio.c
@@ -384,7 +384,6 @@ unsigned long long FIO_decompressFilename(const char* output_filename, const cha
{
toRead = 0;
-#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT==1)
{
size_t sizeCheck;
/* check magic number -> version */
@@ -392,13 +391,14 @@ unsigned long long FIO_decompressFilename(const char* output_filename, const cha
sizeCheck = fread(inBuff, (size_t)1, toRead, finput);
if (sizeCheck==0) break; /* no more input */
if (sizeCheck != toRead) EXM_THROW(31, "Read error : cannot read header");
+#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT==1)
if (ZSTD_isLegacy(MEM_readLE32(inBuff)))
{
filesize += FIO_decompressLegacyFrame(foutput, finput, MEM_readLE32(inBuff));
continue;
}
- }
#endif /* ZSTD_LEGACY_SUPPORT */
+ }
filesize += FIO_decompressFrame(foutput, finput, inBuff, inBuffSize, toRead, outBuff, outBuffSize, dctx);
}
from zstd.
Thanks for notification @luben .
Indeed, this is a path I haven't thoroughly tested.
I should add relevant tests in CI suite, to make sure it's correctly tracked.
Your patch looks good to me. I believe it's the correct fix.
from zstd.
Hopefully fixed in latest "dev" branch update
from zstd.
Btw, I've got a question regarding no-legacy builds.
Currently, building with no-legacy is triggered using ZSTD_LEGACY=disable
.
In the source code, it is done with #define ZSTD_LEGACY_SUPPORT 0
Thus, they are a little bit different.
I'm wondering if it would be better to follow a single convention, such as ZSTD_LEGACY_SUPPORT=0
for both.
from zstd.
Yes, makes sense. I was looking in the Makefiles for find what I have to pass in order to disable it after first trying with ZSTD_LEGACY_SUPPORT=0
from zstd.
Parameter changed to ZSTD_LEGACY_SUPPORT=0 within latest dev branch.
from zstd.
Related Issues (20)
- Is it safe to move compression and decompression contexts between threads? HOT 1
- ZDICT_trainFromBuffer_cover is not thread safe HOT 17
- zstd compression output differens with the same options between 1.5.5 and 1.5.6 HOT 5
- Warning message for `zstd -v --train` is missing line breaks
- How to accelerate the process of dictionary training in zstd? HOT 5
- tests/cli-tests/cltools/zstdless.sh fails with newer version of less HOT 3
- Please promote thread pools from experimental to stable HOT 1
- The CMake build script breaks check_ipo_supported
- Dynamic decompression HOT 3
- Change `dictionary_compression.c` example to use API for dictionary creation
- Enable weak symbol support for Risc-V? HOT 1
- Possibly missing check for truncated initial states in Huffman weight block HOT 4
- Poor compressor behavior on interleaved data HOT 2
- zstd 1.5.5+ has worse performance on Graviton2 nodes than v1.4.4 HOT 4
- [Not a bug] Dictionary building strategy HOT 7
- CLI: Hang bomb with with crafted circular symbolic link causes "zstd -d -r -f" to infinitely loop. "pigz -d-r -f" skips symbolic links with non compressed suffix
- ZSTD Decompression Speed vs Compression Level HOT 3
- is there a pre-trained version for "english" dictionary for web use? HOT 1
- patch-from in single-thread mode unexpected worse performing than multithread HOT 2
- Consider new release, with #4019 applied
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zstd.