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)
- Weird code size when -mbmi2 or -mno-bmi2 is specified HOT 2
- Compressing and decompressing with dictionaries, between different zstd versions HOT 3
- A question about the streaming compression interface HOT 1
- Question in understanding Zstd Digested Dictionaries HOT 2
- Take fixes of zstd tool before it included in latest HOT 4
- question: does `zstd_decompress` function has tolerance of data race HOT 1
- Provide Linux & Darwin (macOS) builds via GitHub Releases
- Disable auto vectorization of xxhash64, when AVX512 is present. HOT 5
- No check if Reserved of Symbol_Compression_Modes is 0 HOT 8
- Spec cleanup: Should fixup behavior when repeat1-1==0 be specified or changed to an error? HOT 3
- Strange tags make automation crazy HOT 1
- Modernize macros to use `do { } while (0)` instead of `{ }` HOT 9
- [question] Seek for insights on the suitable case for zstd dictionary compression HOT 5
- zstd not buildable with PAC/BTI becauseof `huf_decompress_amd64.S` HOT 4
- get a core dump on use ZSTD_compressCCtx (Unhandled exception access violation) HOT 3
- Adding a library to https://facebook.github.io/zstd/#other-languages HOT 1
- Allow files bigger than 2GiB for --patch-from option HOT 1
- Allow files bigger than 2GiB for --patch-from option HOT 2
- [Question] How to force single literal streams during compression HOT 1
- Export "selected" CMake target for zstd HOT 5
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.