New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wasm function signature contains illegal type when the uncompressedSize is not known in advance #3
Comments
Thank you! I had not tested that yet, but agree that it does sound like the thing I was missing. I'm a bit distracted by other things at the moment but will try to add that when I get around to it, or would welcome a PR if you need this yourself. :) |
This is due to the 64bit return type, it was fixed in brwosers 2 years ago. I recompiled my version to use a version with findDecompressedSize returning size_t instead of unsigned long long. See this: WebAssembly/WASI#54 |
modify file -> "zstddec.ts"
|
Thanks @wiedehopf and @iicey! It'd be great to have this fixed, and I appreciate #16. I'd be fine with the limitation of <4GB files for the purposes of this project, or with updating to a newer zstddec version if that's preferable. Or if we think there are not many browsers remaining with this issue, even better. I will need to understand the steps to recompile with this fix in the future though – is there a particular version of the source we can pin and include in the documentation? |
Hey, i wasn't sure you wanted any PRs / you seemed busy and i just wanted to hack it together to make it backwards compatible. So you could get complicated and just pass another arraybuffer for a pseudo 64bit return. Also fiddled with initial memory used / stack memory (handled via compile options). You can see all the changes here: https://github.com/wiedehopf/zstddec-tar1090 And these are my notes on reproducing the wasm compile: I'd say it really depends who you're targeting. I'd say there is little reason for desktop browsers to not be able to handle the 64bit stuff. But with the page i mentioned, there is people with old ipads / iphones trying to use it (2010 and older). zstd has been very nice, using it to compress all the live aircraft data in the C backend and decompress in the website js. So thanks a bunch for your efforts, if you want i can try and make a PR. |
I haven't tried your library yet, and maybe you already tried this, but I wanted to bring this comment facebook/zstd#606 (comment) by a zstd developer to your attention because it looks like a solution to the problem you mention in the readme. 🙂
The text was updated successfully, but these errors were encountered: