JuliaLang/julia — pull request #1355 by kmsquire (2012-10-10 06:39:13+00:00)
Title: RFC: Support for gzip functions in zlib.

I've been sitting on this for a while, and thought I would dust it off and commit it. It probably should be turned into a module.

Some notes:

* This interface is only for gzipped files, not the streaming zlib compression interface. Internally, it depends on/uses the streaming interface, but the gzip related functions are higher level functions.

* GZipStream is an implementation of IO and should be able to be used anywhere IO is used.

* This implementation mimics the IOStream implementation, with some consequences:

* There are some inefficiencies/awkwardness because of differences in the internals of ios and zlib (e.g., readuntil(), and read() for arrays oft BitKinds). Some suggestions for these two functions, in particular, would be greatly appreciated.

* Unicode is supported in a very similar manner to ios, but it might be better to do so using icu.jl (CC: @nolta)

* Currently missing documentation.

Thoughts: while wrapping zlib is fine, the impedance mismatch/overlap between ios and zlib is awkward. Ideally, it would be nice if these were integrated and/or one or both were moved into pure julia code. But probably won't happen right now.

Comments/suggestions appreciated.