Am Sat, 09 Mar 2013 16:30:24 +0000 schrieb Stewart Gordon <smjg_1...@yahoo.com>:
> Yes, random-access file I/O is another thing. I was thinking primarily > of cases where you want to just read the file through and process it > while doing so. I imagine that most word processors, graphics editors, > etc. will read the file and then generate the file afresh when you save, > rather than just writing the changes to the file. > > And then there are web browsers, which read files of various types both > from the user's local file storage and over an HTTP connection. > > Stewart. For most binary formats you need to deal with endianness for short/int/long and blocks of either fixed size or with two versions (e.g. a revised extended bitmap header) or alltogether dynamic size. Some formats may also reading the last bytes first, like ID3 tags in MP3s. And then there are compressed formats with data types of < 8 bits or dynamic bit allocations. It's all obvious, but I had a feeling your use cases are too restricted. Anyways I no longer know what the discrimination between std.io and std.streams will be. -- Marco