snehashis ghosh 2 wrote:
string fileName = fileLists[i].Substring(16);
This looks like code that's making a broad assumption. Are you sure that assumption is always true ?
All of this reads to me as if the third party library you're using is not working. Your best bet IMO is to talk to the authors of that library. Your MemoryStream is not magically constrained to EXACTLY the size of the first file, increasing the size of a memory stream is most certainly not where your issue lies.