Colleagues,
Here's the code (not mine, vendor's, FYI):
As you can see, the buffer there is 16 Kb.
I checked the possible max length of that buffer, Stream.Length, and there's no definite number (However, judging by the data type - Int64, and assuming it's 32 bit byte, after obvious calculations (2^64 / 32 - 1) we arrive to the number ~576 PiB ("petabyte" or "pebibyte", ... which denies any comprehension, let alone credibility.
Hence the question in subject.
AHWBGA!
Regards,
Ilya
Here's the code (not mine, vendor's, FYI):
Code:
private void toStm(Stream input, Stream output)
{ byte[] buffer = new byte[16 * 1024];
int read;
while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
{ output.Write(buffer, 0, read); }
output.Seek(0, System.IO.SeekOrigin.Begin);
}
As you can see, the buffer there is 16 Kb.
I checked the possible max length of that buffer, Stream.Length, and there's no definite number (However, judging by the data type - Int64, and assuming it's 32 bit byte, after obvious calculations (2^64 / 32 - 1) we arrive to the number ~576 PiB ("petabyte" or "pebibyte", ... which denies any comprehension, let alone credibility.
Hence the question in subject.
AHWBGA!
Regards,
Ilya