Git Product home page Git Product logo

Comments (9)

puzrin avatar puzrin commented on August 20, 2024

Need code example.

from pako.

puzrin avatar puzrin commented on August 20, 2024

Any news? There are no such error text in pako ("size is too large"). If your env has limits to max typed array size, that's not pako issue. You probably need to use wrapper to store data in blobs.

from pako.

NekR avatar NekR commented on August 20, 2024

Hmm.. my env? I do not think iOS is mine. Also I never said that its pako issue. Code is simple inflateRaw(new Uint8Array(buffer)) where buffer is deflated file of any size.

I already figured out why that was happening, but firstly just tried to reach other people here how may now it.

from pako.

puzrin avatar puzrin commented on August 20, 2024

You cant use ANY size of typed array. There are limits ~ 400mb even on desktops. You have to use blobs with chunking for large data. Chunking examples are available in api docs.

from pako.

NekR avatar NekR commented on August 20, 2024

@puzrin by ANY size I meant that browser crashes with buffer of any given size, like 1kb, 10kb or 10mb.

from pako.

puzrin avatar puzrin commented on August 20, 2024

Can you provide exact error text and stack trace? I need example, showing that that error happens in pako sources with small binary size. No ideas why this can happen with small buffer sizes. Internally pako allocates only 32K window buffer.

from pako.

NekR avatar NekR commented on August 20, 2024

That is actually a bug in iOS Home Screen apps, it's related to memory corruption, so buffer gets wrong size/data. Fortunately, it's fixed already in iOS 8.4.

There was just a little change to get error report because most of the time browser crashes. Later I figured out that affects not only buffers, but for example JSON API. Sorry for the troubling, at first I thought that it's a pako issues because first error which I get was RangeError: Size is too large (or is negative) thrown from inflateRaw. Now it's clear that it's UA bug.

from pako.

puzrin avatar puzrin commented on August 20, 2024

No problem. So, everything is ok and we should not add warnings for developpers in readme?

from pako.

NekR avatar NekR commented on August 20, 2024

Yes, everything is okay with pako and those problems is not related to it. I.e. it works on iOS perfectly and even on Home Screen apps, unless user will encounter that memory corruption bug, but that bug affects everything, so then almost anything can trigger a crash. Thanks for helping though!

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.