Git Product home page Git Product logo

Comments (10)

puzrin avatar puzrin commented on July 20, 2024

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.

dduponchel avatar dduponchel commented on July 20, 2024

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.

puzrin avatar puzrin commented on July 20, 2024

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.

dduponchel avatar dduponchel commented on July 20, 2024

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.

puzrin avatar puzrin commented on July 20, 2024

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.

dduponchel avatar dduponchel commented on July 20, 2024

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.

puzrin avatar puzrin commented on July 20, 2024

Ok, now i understand why you provided blobs in first message. Thanks.

/cc @andr83

from pako.

puzrin avatar puzrin commented on July 20, 2024

@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.

puzrin avatar puzrin commented on July 20, 2024

Fixed. 0.2.1 released.

from pako.

dduponchel avatar dduponchel commented on July 20, 2024

Thanks !

from pako.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.