

This stream implementation isn’t perfect but it’s far, var better than the MemoryStream approach. So, with the new stream in use the amount of data transferred from S3 drops by more than 99.6% - more than 100 times faster! And that’s before optimizing the size of the ranges being pulled, or the number held in the MRU list, so further improvement are probably possible.
NEWSTREAM JOILET CODE
The DiscUtils website example code for opening a disk image and reading a file looks like it’s very straightforward, and it seems like it will be simple to grab the stream from S3 and use that to hand to the CDReader: using (FileStream isoStream = % loaded")

NEWSTREAM JOILET ISO
I’m familiar with the excellent DiscUtils library, and know I want to use it since the ISO format is complicated and I don’t want to invent the wheel to read from them: dotnet new console dotnet add package AWSSDK.S3 dotnet add package DiscUtils when someone clicks a button) and can’t afford to spend much money on it. Let’s set the stage: Suppose I have disc image files in ISO format on Amazon S3 from which I need to extract some information from just one or two files. The solution is shown to provide orders of magnitude reduction in network traffic when performing simple operations on ISO, Image, Zip and Parquet files and performs similarly with other complex binary formats up to the 5TB S3 object size limit without noticeable degradation in performance (so long as only a small amount of the content is actually being used). This stream can be used with almost any existing code library or package, and I give examples using DiscUtils, MetadataExtractor, Parquet.Net and the. In this article I demonstrate using the S3 API’s to implement optimized reads via a general-purpose, “seekable” Stream implementation in C#. Even if memory size isn’t an issue, the data transfer moving the entire file from S3 can be expensive and wasteful. Some files are big enough that working on them in memory isn’t desirable, or even possible. Some stream interfaces to S3 objects are better than others.
