For Programmers: Free Programming Magazines  


Home > Archive > Compression > July 2006 > Re: Random access to content of archived files without extraction - how? compression









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Random access to content of archived files without extraction - how? compression
Paul Marquess

2006-07-01, 6:55 pm

Mark Adler wrote:

> Claudio Grondi wrote:
>
> It can certainly be done, but I don't know of any off-the-shelf code to
> do it, at least not in the sense you describe. I wrote some example
> code in the zlib distribution showing how it can be done with zlib,
> examples/zran.c, that you can look at. For any scheme, what you do is
> build a random access index that provides the information that allows
> you to a) figure out about where an uncompressed offset is in the
> compressed data, and b) allow you to start decompressing some short
> distance before that location to get your data. A parameter of the
> process is how far apart the index points be and still give you the
> speed of random access you want.


Is it possible to do what zran does on the compression phase? If so, is
there any example code?

Paul
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com