bam-js icon indicating copy to clipboard operation
bam-js copied to clipboard

Support for Content-Encoding:gzip(?)

Open cmdcolin opened this issue 6 months ago • 2 comments

Content-Encoding:gzip often confuses not just jbrowse but the web browser also

In some limited cases, we can skip running pako unzip steps like this PR demonstrates and this will decode the BAM header, but it still fails on the actual BAM data. the error at that point I believe comes from the browser, and not any JS code, so I think this may be the limiting factor

example of allowing the header to be read https://github.com/GMOD/bam-js/compare/t1?expand=1

cmdcolin avatar Dec 11 '23 05:12 cmdcolin

the behavior for this can vary slightly between browsers, so it's a bit tricky. in general, the rule to best play by is to not set Content-Encoding: gzip

cmdcolin avatar Dec 11 '23 05:12 cmdcolin

xref https://github.com/GMOD/jbrowse-components/discussions/4120 another content-encoding:gzip related issue most likely

cmdcolin avatar Dec 11 '23 05:12 cmdcolin