Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Seekable streams

Moderators: larsivi kris

Posted: 06/03/08 11:23:36

I'm downloading some data from a mysql server that I want to zip before passing it on. The problem is that the only way I've found to do this is by saving it to a temporary file as ZipBlockWriter? requires a seekable OutputStream?.

I checked the different streams, and could not find anyone who implements this other than file streams.

Why isn't this added in tango? I guess there are good reasons, but it would be useful as in my example above.

Author Message

Posted: 06/03/08 11:37:42

I also remember a time when there was a MemoryConduit? or something that was seekable... What happened to that one?

Posted: 06/03/08 16:59:47

ZipBlockWriter is indeed for writing a zip file, so that is why it is the way it is. If you just want to compress a stream, use tango.io.compress.ZlibStream.

Posted: 06/06/08 10:50:27

Doh.. Can't see how I missed that one.

Thanks a lot. Works perfectly.