Boost logo

Boost Users :

Subject: Re: [Boost-users] Seekg on a gzip'd file...Is this possible?
From: tom fogal (tfogal_at_[hidden])
Date: 2009-03-14 00:29:42

Cory Nelson <phrosty_at_[hidden]> writes:
> On Fri, Mar 13, 2009 at 7:59 PM, Gerrick Bivins
> <gbivins_at_[hidden]> wrote:
> > Hi Steven,
> > Thanks for the response. Does that mean that the gzip_decompressor in boost
> > doesn't' support seeking or does gzip in general not support seekeing? Any
> > suggestions for working around this problem?
> > Gerrick
> Gzip steams can only move forward. I see no reason why at least this
> couldn't be supported other than most people expect seek to be
> instant, whereas gzip will have to decompress all the way to that
> point. Does seek have some complexity requirements that make this a
> bad idea?

I would say the fact that it would have to decompress all the way to
the seek point is reason enough. As a client, I expect a seek to be
instant, or at most kick off some /background/ I/O to fill a buffer.

I won't argue either way about whether such a call should be added: but
it certainly shouldn't have `seek' in the name if it is. Unless maybe
it's named ``expensive_seek'' or similar ;)



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at