ANN: pipes-zlib 0.2.0.0

39 views
Skip to first unread message

Renzo Carbonara

unread,
May 7, 2013, 8:37:56 PM5/7/13
to haskel...@googlegroups.com, Gabriel Gonzalez
`pipes-zlib` [0] is a small library that allows compressing and
decompressing strict `ByteString` streams using the zlib compression
codec.

This new version is updated to work with `pipes` 3.3 and builds on top
of the `zlib-bindings` [1] library by Michael Snoyman, which doesn't
rely on Lazy IO, as opposed to the `zlib` [2] library. Still, most of
types used are those exposed by the `zlib` library, since that's also
the approach taken by the `zlib-bindings` library.

I thank Paolo Capriotti, the original author of `pipes-zlib`, for
allowing me to reuse the `pipes-zlib` name for this new and backwards
incompatible version of the library.

I haven't tested this library much, please don't hesitate to report any errors.

In the future it would be nice to modify the API so that the
`CompressParams` [3] and `DecompressParams` [4] types from the `zlib`
library can be reused. That would probably involve modifying the
`zlib-bindings` library, though.


Regards,

Renzo Carbonara.


[0] http://hackage.haskell.org/package/pipes-zlib-0.2.0.0
[1] http://hackage.haskell.org/package/zlib
[2] http://hackage.haskell.org/package/zlib
[3] http://hackage.haskell.org/packages/archive/zlib/0.5.4.1/doc/html/Codec-Compression-Zlib-Internal.html#t:CompressParams
[4] http://hackage.haskell.org/packages/archive/zlib/0.5.4.1/doc/html/Codec-Compression-Zlib-Internal.html#t:DecompressParams

Gabriel Gonzalez

unread,
May 7, 2013, 9:13:26 PM5/7/13
to Renzo Carbonara, haskel...@googlegroups.com
Wow, thanks! Now I REALLY need to finish up pipes-bytestring :).

Renzo Carbonara

unread,
May 7, 2013, 9:34:45 PM5/7/13
to haskell-pipes
On Tue, May 7, 2013 at 9:37 PM, Renzo Carbonara <gnuk...@gmail.com> wrote:
> In the future it would be nice to modify the API so that the
> `CompressParams` [3] and `DecompressParams` [4] types from the `zlib`
> library can be reused. That would probably involve modifying the
> `zlib-bindings` library, though.

Oh, and the `IO` base monad shouldn't be there, compression and
decompression ought to be pure. `IO` is there due to a limitation
imposed by the current implementation of `zlib-bindings`. I look
forward to changing that in the future :)


Regards,

Renzo Carbonara.

Gabriel Gonzalez

unread,
May 8, 2013, 1:42:56 PM5/8/13
to haskel...@googlegroups.com
Don't worry.  There is no hurry.  Also, I actually thought it would require `IO`!

However, the pure version will still be nice, especially for doing pure testing.

Also, I like the clean API.  Very simple and easy to use.

Regards,

Renzo Carbonara.

--
You received this message because you are subscribed to the Google Groups "Haskell Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-pipe...@googlegroups.com.
To post to this group, send email to haskel...@googlegroups.com.



Renzo Carbonara

unread,
May 8, 2013, 2:37:34 PM5/8/13
to haskell-pipes
On Wed, May 8, 2013 at 2:42 PM, Gabriel Gonzalez <gabri...@gmail.com> wrote:
> Also, I like the clean API. Very simple and easy to use.

Thanks :)

Oliver Charles

unread,
May 19, 2013, 4:19:03 PM5/19/13
to haskel...@googlegroups.com
Hey, just wanted to express my thanks for this too. I'm working on streaming the contents of .tar.gz files, and once I wrote my .tar parser - I just had to slot decompressD into the proxy composition and bam - I can read .tar.gz too!

Nice work :)

Renzo Carbonara

unread,
May 19, 2013, 5:50:41 PM5/19/13
to haskel...@googlegroups.com
On Sun, May 19, 2013 at 5:19 PM, Oliver Charles <ol...@ocharles.org.uk> wrote:
> Hey, just wanted to express my thanks for this too. I'm working on streaming
> the contents of .tar.gz files, and once I wrote my .tar parser - I just had
> to slot decompressD into the proxy composition and bam - I can read .tar.gz
> too!

Fascinating! Thanks for letting us know! Welcome to the pipes!

I guess you are officially the first `pipes-zlib` user :) Please tell
us if you find any issues.

¿How did you go about parsing the TAR files with the current tools?
I'm not experienced in that format. ¿Would you care to share some
code?



Regards,

Renzo Carbonara.

Oliver Charles

unread,
May 20, 2013, 2:45:41 AM5/20/13
to haskel...@googlegroups.com

On Sunday, May 19, 2013 10:50:41 PM UTC+1, Renzo Carbonara wrote:
On Sun, May 19, 2013 at 5:19 PM, Oliver Charles <ol...@ocharles.org.uk> wrote:
> Hey, just wanted to express my thanks for this too. I'm working on streaming
> the contents of .tar.gz files, and once I wrote my .tar parser - I just had
> to slot decompressD into the proxy composition and bam - I can read .tar.gz
> too!

Fascinating! Thanks for letting us know! Welcome to the pipes!

I guess you are officially the first `pipes-zlib` user :) Please tell
us if you find any issues.

¿How did you go about parsing the TAR files with the current tools?

I'm using pipes-bytestring to stream a ByteString out from a Handle, along with pipes-parse for push back support and the ability to request x bytes at a time. I use Cereal for my parsing. The tar format is really easy, and I'm actually thinking of doing a live-coding type screencast of the whole thing.

I'm not experienced in that format. ¿Would you care to share some code?

Sure, my initial work is at https://github.com/ocharles/pipes-tar

- ocharles
Reply all
Reply to author
Forward
0 new messages