<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Sean,</p>
<p>Yes, GDAL has an adapter between its VSI file system abstraction
and OpenJPEG own pluggable I/O layer, so you can use any VSI
virtual file system that has read & seek capabilities (so you
can potentially do /vsizip//vsicurl/ of a JP2). But the efficiency
might not be that great. Typically if it is a huge JPEG2000 file
and you just need to extract a subset of it, even if it is tiled,
locating the tile of interest might involve browsing through all
the file, and thus decompressing most of it. For 2 reasons:</p>
<p>- first, support for exploiting the TLM marker, which is the
equivalent of the TIFF TileOffset index, has been added only
recently in OpenJPEG master, so not released yet. And not all
tiled JPEG2000 files include TLM markers. The minimum JPEG2000
formulation is that each tile has just a header with its size, and
so you have to go from one header to the next one to locate all
tiles.</p>
<p>- and even if your file has TLM markers and you use openpjeg
master, if your ZIP is a regular ZIP and not a SOZip (shameless ad
for <a class="moz-txt-link-freetext" href="https://github.com/sozip/sozip-spec">https://github.com/sozip/sozip-spec</a>), seeking through at an
arbitrary within a compressed file within a ZIP is a slow
operation. But if someone really needs to include a JPEG2000 file
they would better included it as a non-compressed file, because
there's absolutely no file size gain to expect from applying
deflate to a JPEG2000 file, and including it as non-compressed
naturally enables fast random seeking.</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 14/09/2024 à 21:41, Sean Gillies via
gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAOodmJpzcekQfSibWvn3V8VKzaX0CzidZEf1-GPdo2EXedVaeg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hi all,</div>
<div><br>
</div>
<div>In theory, we can read anything from a zip archive without
extracting it to the filesystem, but sometimes drivers have
special requirements and limitations. Is JP2 from a zipfile
supported by OpenJPEG?<br>
</div>
<br>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">Sean Gillies</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>