Comments (10)
Could you check it first with pako 0.2 ? If possible - write a test example directly for pako (add fixture + extend one of tests in your fork). It already has rawDeflate test https://github.com/nodeca/pako/blob/master/test/inflate.js#L20-L22 , probably it will be enougth to just add original (not compressed) file into test/fixtures/samples
folder.
from pako.
I get the same error with pako's master (just tested with pako 0.2, same result).
I don't have time to create the test right now but I will tonight !
from pako.
Hm... i've downloaded original apachepoi_46535.xlsx
, placed to fixtures, but all tests, involved it, passed. Do you operate with arrays or strings? Probably, something wrong with strings format? Inflate consider input string as binary, not utf8-encoded.
Will be waiting for reduced example. Code in test folder is quite simple, but if you need any help about using sources - let me know.
from pako.
Now a comment without time pressure !
I added failing unit tests to show to issue. The files sheet2.compressed to sheet4.compressed come from the file apachepoi_46535.xlsx
(entry xl/worksheets/sheet2.xml to xl/worksheets/sheet4.xml). They are the compressed content of the entries. I've extracted them with JSZip (in nodejs, manipulating Buffers). The files sheet{2..4}.data are the extracted files (with unzip
).
from pako.
Seems i didn't understood the root of problem before. Does pako fails to unpack content, prepared in another zipper (not js-zip)?
from pako.
Sorry if I wasn't clear.
The xlsx file comes from the tests of Apache POI, here. I don't know which tool generated it but I'm sure it's not JSZip :)
When unpacking the content with pako and inflateRaw
, I get an error. When I use unzip (to extract or to test the xlsx file) everything is fine.
I tested other xlsx files but that's the only file that trigger the bug.
from pako.
Ok, now i understand why you provided blobs in first message. Thanks.
/cc @andr83
from pako.
@dduponchel pako had bug - blocks with fixed dictionaries caused overwrite of dynamic tables.
https://github.com/nodeca/pako/tree/issue-22 - this branch contains fix, but we not yet decided about code clearness. Will finish in 1-2 days with release.
from pako.
Fixed. 0.2.1 released.
from pako.
Thanks !
from pako.
Related Issues (20)
- "Error: -3" when inflating chunks of data HOT 2
- How to decompress blob? HOT 2
- Deflate() creating broken zip file
- Use classes to improve tree-shaking HOT 8
- No way to read Deflate data in chunks. HOT 4
- CI: set minimal permissions on GitHub Workflow HOT 2
- Cannot install pako HOT 1
- library initialization slowing down app start
- TypeError: input.subarray is not a function HOT 1
- Docs update: mention what `inflate` and `deflate` actually return
- Incorrect JSDoc type information for optional parameters
- Expecting a new version release HOT 1
- Different 10th byte gzip header between zlib and pako on Mac OS 13 HOT 1
- License declaration in package.json and LICENSE are not the same
- GZIP pako compressed string results in "Not in GZIP format" in JAVA on decompressing HOT 1
- Inconsistency and `undefined` return in `inflate` method between versions v1 and v2
- Using static dictionary, inflateRaw "Uncaught invalid stored block lengths"
- how to gzip multiple files? HOT 1
- Not compatible with Angular v17
- Getting corrupted data on decompressing HOT 1
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 pako.