Skip to content
This repository has been archived by the owner on Jan 26, 2020. It is now read-only.

Flush support #25

Open
fasterthanlime opened this issue Nov 20, 2015 · 8 comments
Open

Flush support #25

fasterthanlime opened this issue Nov 20, 2015 · 8 comments

Comments

@fasterthanlime
Copy link
Contributor

When using brotli as transport compression, it's useful to be able to force flush between messages.

edit: compression, not encryption 🐙

fasterthanlime added a commit to itchio/brotli-go that referenced this issue Nov 21, 2015
@fasterthanlime
Copy link
Contributor Author

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

@kothar
Copy link
Owner

kothar commented Dec 2, 2015

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?

@fasterthanlime
Copy link
Contributor Author

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

@fasterthanlime
Copy link
Contributor Author

Maybe @dsnet has some insight on this? 👯

@aaronfranke
Copy link

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

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

@fasterthanlime
Copy link
Contributor Author

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!

@kothar
Copy link
Owner

kothar commented Jan 11, 2018 via email

@kothar
Copy link
Owner

kothar commented Jan 25, 2020

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 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants