snoyberg / zlib-bindings

THIS LIBRARY IS DEPRECATED: Please use streaming-commons instead
4 stars 12 forks source link

Feature Request: deflateSetDictionary support #3

Closed robinbrandt closed 12 years ago

robinbrandt commented 12 years ago

Hi Michael,

I'm currently looking into implementing a SPDY server based on warp (great work by the way!). SPDY compresses headers with zlib but is using a custom dictionary.

I wonder if you'd add support for this in zlib-bindings or would merge a patch for this. I haven't really used C-bindings from haskell yet but I guess it should be not too hard.

Best regards, Robin

snoyberg commented 12 years ago

I'd definitely merge a patch, or help out with implementing this if necessary. One of the things on my TODO list is to kick off a discussion of implementing SPDY, so I'd be very happy if you did this. Are you planning on using the tls package? I'm sure Vincent would be interested in working on this as well.

robinbrandt commented 12 years ago

I didn't check the TLS package yet but I guess it needs to implement an extension called next protocol negotiation (NPN) which seems to be needed for SPDY.

Would you use the Yesod google group for the discussion?

snoyberg commented 12 years ago

I actually think web-devel would be a better place for this. I'd already discussed this briefly with Gregory Collins (Snap), so there's interest in this outside of Yesod.

vincenthz commented 12 years ago

Just had a peek through the NPN draft and it seems relatively easy to implement. I find it a bit suspicious that's needed though for SPDY, but I'd be happy to help for whatever is necessary.

snoyberg commented 12 years ago

Vincent: as always, you're too awesome. How'd you even know about this ticket?

vincenthz commented 12 years ago

Hey Michael, it's just a coincidence of looking at my github feed, and seeing a new issue on zlib-bindings (which i'm following). so, just github awesomeness in this case :-)

robinbrandt commented 12 years ago

Hi Vincent and Michael!

I just had a look at it and would love to get some opinions on the implementation:

snoyberg commented 12 years ago

Both ideas sound fine to me. I'll admit though that I'm no expert on the zlib library.

snoyberg commented 12 years ago

Thanks for implementing that Robin. So what's the next step in implementing SPDY? It might be worth moving the discussion to web-devel.

robinbrandt commented 12 years ago

Hi Michael,

I already started on a parser for the SPDY frames but you're right, I'll put this on web-devel to start a discussion about it.