Hey

I want to Load/read/write a big file (ISO) in C#. Ive tried various combinations (FileStream, BinaryStream, etc) but all of them give me a "OutOfMemory" exception. What is the best way to load a big file into C# to work with it?

Ill be using the DiscUtils library if its any help.

How big is the file? You are limited by how much memory you have on your system, and the 2GB data limit (if you are using .NET 4.0 or lower).

How big is the file? You are limited by how much memory you have on your system, and the 2GB data limit (if you are using .NET 4.0 or lower).

It will be a .ISO file. Max is 1GB. I dont think Ill go over that. Im running on 2GB of RAM. Im using .NET 4.5 to develop this so that limit wont exist :)

Edited 4 Years Ago by riahc3

2GB of ram isn't going to give you much data space. Do you have to load the entire file at once or can you load it in parts?

2GB of ram isn't going to give you much data space. Do you have to load the entire file at once or can you load it in parts?

Im going to be adding/deleting files to and from the ISO. You tell me :)

ISO files have a format, you'll need to understand what it is and write to that format. Deleting files will probably be the hardest part.

Wikipedia
and a simple search turned up this, which may help

Edited 4 Years Ago by Momerath

This article has been dead for over six months. Start a new discussion instead.