Comments (9)
Thanks for reporting. I'll look into it.
From what I understand, (2^64 - 1) is not cSize as "the compressed size", it's an error code which is valid.
Now it remains to understand what could trigger this error code ....
from zstd.
@Cyan4973
In ZSTD_compressSequences:
{
size_t cSize;
size_t litSize = op_lit - op_lit_start;
if (litSize <= LITERAL_NOENTROPY) cSize = ZSTD_noCompressBlock (op, maxDstSize, op_lit_start, litSize);
else
{
cSize = ZSTD_compressLiterals(op, maxDstSize, op_lit_start, litSize);
if (cSize == 1) cSize = ZSTD_compressRle (op, maxDstSize, op_lit_start, litSize);
else if (cSize == 0)
{
if (litSize >= maxLSize) return 0; /* block not compressible enough */
cSize = ZSTD_noCompressBlock (op, maxDstSize, op_lit_start, litSize);
}
}
if (ZSTD_isError(cSize)) return cSize;
op += cSize;
}
from zstd.
Yes, you are right, the name of the variable is cSize
.
But it's first and foremost the return value of either function ZSTD_compressLiterals()
, or ZSTD_compressRle()
, or ZSTD_noCompressBlock()
. This return value is either a compressed length or an error code. That's why it must always be checked with ZSTD_isError()
.
In this case, it's an error code. Which means the called function detected a problem, and reported it.
So now, bug hunting is about knowing which function was called, and then why it detected and reported a problem (which exact test triggered it). To do that, I'll probably need a sample.
from zstd.
Yes, maybe we should add error enum to measure which phase is unexpected, not the 2^64 -1.
from zstd.
hi @BohuTANG
Would it be possible to get a sample which produces the error ?
Also : could you try latest update in the "dev" branch with the sample which produced the problem ?
Thanks
from zstd.
I will try the dev branch.
But I am interested in why caused this error?
On Monday, July 6, 2015, Yann Collet [email protected] wrote:
hi @BohuTANG https://github.com/BohuTANG
Would it be possible to get a sample which produces the error ?
Also : could you try latest update in the "dev" branch with the sample
which produced the problem ?Thanks
—
Reply to this email directly or view it on GitHub
https://github.com/Cyan4973/zstd/issues/37#issuecomment-118671337.
BohuTANG
"The great artist is the simplifier."--- Vincent Van Gogh
from zstd.
Without access to a sample to reproduce the issue, I'm not able to tell.
from zstd.
latest updates have been pushed to master, so you can also test this version if you wish
from zstd.
Sure, I will have a try.
On Wed, Jul 8, 2015 at 10:50 AM, Yann Collet [email protected]
wrote:
latest updates have been pushed to master, so you can also test this
version if you wish—
Reply to this email directly or view it on GitHub
https://github.com/Cyan4973/zstd/issues/37#issuecomment-119404894.
BohuTANG
"The great artist is the simplifier."--- Vincent Van Gogh
from zstd.
Related Issues (20)
- 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
- [Question] Understanding of compression level with external sequence producer HOT 2
- zstd fails to process some filenames on Windows [we need a hero] HOT 3
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.