Home > Archive > Compression > February 2008 > Seeking into a deflated stream
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 |
Seeking into a deflated stream
|
|
| Thomas 2008-02-15, 3:56 am |
| Hi,
I wonder if it is possible to s into a deflated stream without
inflating it.
I thinking about s ing into zipped textures, which contain mipmaps I
don't necessarily want to uncompress.
Has anyone an idea ?
Thanks
Tom
| |
| Thomas Pornin 2008-02-15, 7:56 am |
| According to Thomas <thobuc@gmail.com>:
> I wonder if it is possible to s into a deflated stream without
> inflating it.
Generally speaking, no. You may _recover_ from a damaged stream by
locating the headers for uncompressed blocks, but there is no generic
way for knowing from where those blocks come within the uncompressed
stream.
However, if you do control the compression process, then you can
include "full sync" points between some mipmaps, and create an index
table to unambiguously locate those sync points in the compressed
stream. A "full sync" point entails closing the current deflate block,
adding a zero-length uncompressed block, and forgetting previous data
for LZ77 processing; this ensures byte alignment and lossless data
s ing.
--Thomas Pornin
| |
|
|
|
|
| Mark Adler 2008-02-16, 9:58 pm |
| You can't ignore the sliding dictionary while scanning a deflate
stream, since the matched string data may propagate through several
matches from the very beginning of the stream. All of the inflate
processing must be done must be done from the beginning to the s
point, e.g. decoding the codes and writing the literals and matching
strings, in order to maintain the sliding dictionary.
Thomas Pornin answered the question correctly, which is that the only
way to s and avoid processing the deflate stream from the beginning
is if you have control over the generation of the deflate stream and
occasionally insert synchronization points that throw away the sliding
dictionary.
| |
| Stefano Brocchi 2008-02-16, 9:58 pm |
| I found an article about searching in files compressed with LZ-based
techniques. I haven't read it all, but probably it could be of use at
least for some ideas. The link:
http://www.dcc.uchile.cl/~gnavarro/...re/lzgrep.ps.gz
So long,
Stefano
| |
| Thomas 2008-02-25, 6:57 pm |
| On 16 f=E9v, 21:23, Stefano Brocchi
<stefano.broc...@researchandtechnology.net> wrote:
> I found an article about searching in files compressed with LZ-based
> techniques. I haven't read it all, but probably it could be of use at
> least for some ideas. The link:
>
> http://www.dcc.uchile.cl/~gnavarro/...re/lzgrep.ps.gz
>
> So long,
> Stefano
Hi,
Thanks for all answers !
=46rom what I've read, I cannot do what I need to without having a
custom zip format that will not be readable by other zip software.
I'll see if I want to keep the compatibility with the standard or not.
Sincerly,
Thomas
| |
| Thomas 2008-02-25, 6:57 pm |
| On 16 f=E9v, 21:23, Stefano Brocchi
<stefano.broc...@researchandtechnology.net> wrote:
> I found an article about searching in files compressed with LZ-based
> techniques. I haven't read it all, but probably it could be of use at
> least for some ideas. The link:
>
> http://www.dcc.uchile.cl/~gnavarro/...re/lzgrep.ps.gz
>
> So long,
> Stefano
Hi,
Thanks for all answers !
=46rom what I've read, I cannot do what I need to without having a
custom zip format that will not be readable by other zip software.
I'll see if I want to keep the compatibility with the standard or not.
Sincerly,
Thomas
| |
| Mark Adler 2008-02-25, 6:57 pm |
| On Feb 25, 8:23=A0am, Thomas <tho...@gmail.com> wrote:
> From what I've read, I cannot do what I need to without having a
> custom zip format that will not be readable by other zip software.
No, that's not the case. You can create s able data in the zip
format and remain completely compatible. The point is that you need
to create or convert the file in a special way in order to be
s able. It will still be readable and unzippable by other zip
software.
Mark
|
|
|
|
|