I wish I could. But basically these are large blobs (usually GIS images, but can be regular images and sometimes large zips).
Unfortunately I don't have control over the project, and only have this little box I can work in (read data from a socket, and optimize the memory ). I was using a MemoryStream, simply because it was quick and easy. I'm moving to a dynamically expanding byte array, but the Trimming part is what I was/am worried about. Cheers! Dave ----- Original Message ----- From: "David Lanouette" <[EMAIL PROTECTED]> To: <ADVANCED-DOTNET@DISCUSS.DEVELOP.COM> Sent: Thursday, July 06, 2006 3:37 PM Subject: Re: [ADVANCED-DOTNET] trim byte array > Dave, > > Do you really need to keep all the data around? Could you read a few meg, > then process that data, then read more data and process that, etc... ? > > I've found it rare to "have to" deal with such large collections of data all > at once. > > Basically, I'm saying that maybe you could look at the problem from a > different point of view. > > HTH. > > ______________________________ > - David Lanouette > - [EMAIL PROTECTED] > > "Excellence, then, is not an act, but a habit" - Aristotle > > > > > > > -----Original Message----- > > From: Discussion of advanced .NET topics. > > [mailto:[EMAIL PROTECTED] On Behalf Of dave wanta > > Sent: Thursday, July 06, 2006 4:26 PM > > To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM > > Subject: Re: [ADVANCED-DOTNET] trim byte array > > > > That would be a good work-around. But, I don't have write > > access (gotta love all of these constraints. ;-) ) > > > > Cheers! > > Dave > > ----- Original Message ----- > > From: "Barry Kelly" <[EMAIL PROTECTED]> > > To: <ADVANCED-DOTNET@DISCUSS.DEVELOP.COM> > > Sent: Thursday, July 06, 2006 3:20 PM > > Subject: Re: [ADVANCED-DOTNET] trim byte array > > > > > > dave wanta <[EMAIL PROTECTED]> wrote: > > > > > It's from a socket, so I don't know the size until i get the > > > terminating characters. > > > > You could probably consider streaming it to a temporary file, > > then, since I expect a download of many 100s of MB wouldn't > > be immediate. You wouldn't want many of those arrays hanging > > around during concurrent requests / responses etc. > > > > -- Barry > > > > -- > > http://barrkel.blogspot.com/ > > > > =================================== > > This list is hosted by DevelopMentorR http://www.develop.com > > > > View archives and manage your subscription(s) at > > http://discuss.develop.com > > > > =================================== > > This list is hosted by DevelopMentorR http://www.develop.com > > > > View archives and manage your subscription(s) at > > http://discuss.develop.com > > > > =================================== > This list is hosted by DevelopMentorĀ® http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com > =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com