iteratee ByteStringLike conversions

Michael Baikov manpacket at gmail.com
Mon Nov 14 01:41:43 GMT 2011


The best possible option of  handling exception should be capturing
SeekExceptions and transforming them internally in such way, that all
consumers will work exactly the same way as they worked on
uncompressed version of the same stream. This can be inefficient and
slow (not every compression type supports seeking) or require some
extra bookkeeping, but as a result it will give as the ability to
transparently support any compression, which is very cool. It should
pass all other exceptions as they are.

Also it will be great  to add module Data.Iteratee.Compress with two
exported functions

enumCompress :: MonadIO m => FilePath -> Enumeratee ByteString ByteString m a
enumDecompress :: MonadIO m => FilePath -> Enumeratee ByteString ByteString m a

which will detect used format by file extensions and will use default
options for packing/unpacking - just  a simple high level functions
for those who are not interested in fine tuning compression details a
lot (it  is about 99.8% of all users I suspect).


On Sat, Nov 12, 2011 at 11:15 AM, Maciej Marcin Piechotka
<uzytkownik2 at gmail.com> wrote:
> On Fri, 2011-11-11 at 12:48 +0800, Michael Baikov wrote:
>> Also enumInflate in iteratee-compress *should* be implemented in terms
>> of Enumeratee instread of Enumerator, because it's idea is to
>> transform data stream from one type to another and not the iteratee
>> itself.
>
> I fixed it in current master (along with disabling the debug flag by
> default). I haven't had time to test it.
>
> However - is the code passing errors correctly? If not - what's the
> correct approach?
>
> Best regards
>
>



More information about the Iteratee mailing list