Giter Site home page Giter Site logo

Flush support about brotli-go HOT 8 OPEN

kothar avatar kothar commented on August 30, 2024
Flush support

from brotli-go.

Comments (8)

fasterthanlime avatar fasterthanlime commented on August 30, 2024

I implemented this in itchio@529f981 but my initial tests make me think it's unreliable (although there were a few other things in my pipeline, so a properly-isolated test would be better..)

from brotli-go.

kothar avatar kothar commented on August 30, 2024

I've merged your Flush method in #27 @fasterthanlime, but rearranged the encoder slightly to factor out the flush behaviour between Write, Flush and Close.

Unfortunately the tests fail - can you take a look to see if I've done something stupid? Decoding a buffer if you've used Flush seems to fail - is that what you've seen in your tests?

from brotli-go.

fasterthanlime avatar fasterthanlime commented on August 30, 2024

@kothar just looked, not seeing anything stupid in #27, and yes, that's the behavior I was experiencing.

Either there's something fishy upstream, or we're not using the API the way they thought users would?

from brotli-go.

fasterthanlime avatar fasterthanlime commented on August 30, 2024

Maybe @dsnet has some insight on this? 👯

from brotli-go.

aaronfranke avatar aaronfranke commented on August 30, 2024

@fasterthanlime has forked this repo and updated it, perhaps it's up to him now.

https://github.com/itchio/go-brotli

from brotli-go.

fasterthanlime avatar fasterthanlime commented on August 30, 2024

I haven't told @kothar about my fork yet :) Let's do it now:

I wanted to update to the latest upstream, and

  • some features were deleted (custom dictionary support - I hear it's coming back soon)
  • I also changed the interface a little bit (removed BrotliParams, it's now a simple struct)
  • the Compress/DecompressBuffer tend to not take an input buffer in my version - decompressed size estimation code is gone too
  • the Writer in particular has changed a lot, it's heavily inspired by the cbrotli package that upstreams ships. Their encoder is now C-only, so it has a clean interface and we don't need encode_go.cc anymore
  • my fork isn't using gopkg.in - it's vendored in the projects using it anyway

I didn't want to be a bother so it's in a fork for now!

from brotli-go.

kothar avatar kothar commented on August 30, 2024

from brotli-go.

kothar avatar kothar commented on August 30, 2024

I have added a link to https://github.com/itchio/go-brotli to the project description, and as I'm unlikely to be working on this binding in the immediate future I'll archive this repo. I'll submit any future changes to your repo @fasterthanlime 👍

from brotli-go.

Related Issues (15)

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.