4 ms·
> You would never have a range start anywhere but the top of the file, as the whole point is that the later octaves are refinements of earlier ones. Correct, b
by acdha 11y ago
> You would never have a range start anywhere but the top of the file, as the whole point is that the later octaves are refinements of earlier ones.
Correct, but also arguing against a claim I never made. 1-10 and 1-1000 are both range requests.
> What makes JPEG2000 so amazing for this use case is precisely that you don't need to care about "ranges" (if you needed ranges, we might as well just have multiple files..).
The difference is simply performance: separate files lower cache hit ratios. Smart HTTP caches, including some CDNs, cache a given resource only once so e.g. a laptop user can get an edge hit for the first n bytes which an iPhone user just read and the image can start displaying immediately while the finer detail streams in.
Similarly, streaming the download and canceling after you've read enough for your target output resolution means that you're likely to wasting time transferring more bytes than you actually needed. That's particularly nice on a high-latency wireless network where a significant amount of data can be in-flight and those unneeded bytes will consume battery power to transfer and will likely delay transferring other resources which are actually needed.