On Thu, Jul 14, 2016 at 12:35 AM, A Keeton <ajkee...@gmail.com> wrote:
> I'm trying to decompress messages arriving over websockets that are using
> permessage-deflate.

You say that you're using "per message" deflate...


> Each new websockets message is written into buf and then I call Read on

...but then it sounds like you're concatenating all of the messages
together, writing them all to the one buffer, so you're treating it as
"per stream" deflate instead of "per message".


> flater. It works for 1 or more messages (sometimes several right up until I
> fill the 32k window). Eventually the Read fails and flate says there is a
> corrupt byte before some offset. Even after more data has been written to
> buf, successive reads fail. I presume there's some need to reset the flater
> to a previous state, but Reset hasn't gotten me anywhere.

Calling Reset is probably the way to go, but it's hard to give more
specific advice without seeing your code, preferably a self-contained
example and one that's as small and as simple as possible.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to