Comments (1)
Is this also related to #44 ?
TLDR: It's related but does not solve the issue because there's an unhandled corner case.
I withdrew that commit as there is an unhandled corner case (*). Sorry.
I'm not sure I have any good answers for you but here are my two cents. Most of which I suspect you already know.
Within the context of lzfse_decode_buffer
my understanding is that the return value, let's call it ret
, can communicate three outcomes:
- Success. Here
ret
reflects the number of bytes written into the destination buffer. - Destination buffer is too small. Here
ret
equals the size of the destination buffer. - Decode error. Here
ret
equals 0. This is not explicitly documented but we can see the relevant code here.
The issue is that ret
is overloaded. It's not always possible to assign an outcome based on ret
alone.
For example, let's take a ret
value of zero. This could mean:
- Success. Where we've decoded a zero-length input file.
- Destination buffer is too small. Where we've passed a zero-sized destination buffer.
- Decode error. Where we've passed invalid data.
Although we can exclude scenario 2 by not passing in zero-sized buffers, we still cannot differentiate between scenarios 1 and 3 (*). We need more information. At some level, we need to tweak the API. One such suggestion is here.
from lzfse.
Related Issues (20)
- No portable fallbacks for GCC builtins
- gzip switch compatibility HOT 1
- Library release versioning HOT 4
- error when using on centos 7
- Conan package
- Unaligned loads in decoder fail on asm.js. HOT 2
- Crash (double free) when compressing empty file or pipe HOT 3
- I want to compress a file use lzfse on system-level ,like lzvn or zlib,what could I do? HOT 1
- Attempt to decode throws a malloc error HOT 3
- how to inline compile assembly HOT 2
- Try impl on Android but app crashes
- [Question] How to build this as dylib (consumable in a .NET Core project) HOT 1
- UBsan flags 2 loops in lzfse_decode_base.c with "Pointer Overflow" warnings HOT 2
- https://github.com/sbingner/lzfse.git HOT 1
- lzfse decode issue - msys2 build HOT 1
- add support for LZBITMAP HOT 4
- Not able to decompress iCloud backup file when size is greater than 64KB
- Compression of inputs larger than 2GiB degraded
- Memory-related crash
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 lzfse.