[ 
https://issues.apache.org/jira/browse/JENA-601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13840037#comment-13840037
 ] 

Andy Seaborne commented on JENA-601:
------------------------------------

+1
Some thing work currently, some do not because support was added after various 
bits of I/O code were written.  Cataloguing what works and what does not will 
help pin down the areas to fix:

*ARQ*

Works:
{noformat}
SELECT *
FROM <file:D.ttl.gz>
{ ?s ?p ?o }
{noformat}

Does not work:
{noformat}
SELECT *
FROM <http://localhost/D.ttl.gz>
{ ?s ?p ?o }
{noformat}

*RIOT*
Same pattern.  {{LocatorURL}} does not uncompress automagically.  
{noformat}
riot D.ttl.gz
{noformat}
Parsing foo.nt.gz does work at the moment, other compression formats do not)

Ideas:
* Maybe keep {{LocatorURL}} and add one that does add a decompress wrapper.  
The standard {{StreamManager}} would include the auto-decompress version.

* Alternative: Add to interface {{Locator}} an operation 
{{openUncompressed(String)}}.

> Provide better support for compressed input formats
> ---------------------------------------------------
>
>                 Key: JENA-601
>                 URL: https://issues.apache.org/jira/browse/JENA-601
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: RIOT
>    Affects Versions: Jena 2.11.0
>            Reporter: Rob Vesse
>
> Currently Jena has little or not support for compressed input formats.  There 
> are the odd cases where some consideration is given e.g.
> - {{RDFLanguages.filenameToLang()}} strips off {{.gz}} extensions to help it 
> correctly detect file types
> - HTTP responses can deal with compressed responses by virtue of Apache 
> HttpClient
> What would be nice is to have a better strategy for handling compressed 
> inputs.  For example having a registry of known compression extensions e.g. 
> {{.gz}}, {{.bz2}}, {{.deflate}} which ARQ would strip off when trying to 
> deduce format from the filename.
> It would also be useful if the various locator implementations took 
> compression into account when opening input streams as I'm fairly sure if you 
> asked ARQ to open a {{foo.nt.gz}} file it would just open a raw input stream 
> and then the reading would fail.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to