Giter VIP home page Giter VIP logo

Comments (4)

101arrowz avatar 101arrowz commented on May 16, 2024 1

No, your solution should be correct, and there's a bug that is causing it to fail. Honestly, I'm surprised that there's an error with pushing a final empty chunk; I extensively tested the ability to do exactly that for exactly this reason. I'll push an update when the bug is fixed. Thanks for the report.

from fflate.

101arrowz avatar 101arrowz commented on May 16, 2024 1

@BitLooter Check v0.4.7 on NPM and let me know if it solves the issue. I'm pretty sure the problem's been resolved on the specific example you gave, but just to make sure, I'd suggest you test on your full code as well. Sorry for the cryptic error, and thanks for taking the time to make a reproducible example!

By the way, you may want to take a look at this file in the demo, which uses the Web Streams API to conform to the WHATWG streaming spec. It looks to be in line with what you're doing.

from fflate.

BitLooter avatar BitLooter commented on May 16, 2024 1

Just tested it, working perfectly now. Thanks for the quick fix!

I also took a look at stream-adapter. Looks useful if I need a TransformStream but what I'm doing is a little different - mine is just a WritableStream that collects the output chunks to a buffer. I'm using it to decode a stream from a fetch request directly into a Uint8Array without an intermediate buffer. I'll keep it in mind if I need an output stream though.

from fflate.

101arrowz avatar 101arrowz commented on May 16, 2024

Did the update end up working for you?

from fflate.

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.