Joining files

  • Thread starter Thread starter Hugh Janus
  • Start date Start date
H

Hugh Janus

Hi group,

I have an app that streams files over the network. What I want to be
able to do now is select a folder and stream the entire contents of
that folder over the network. I could simply just loop through each
file and transmit them one at a time but I would rather somehow stream
all the files into a single file and then transmit this one file. Upon
receipt, then "un-stream" all these files. Something similar to the
TAR command on unix. Compression as well would be a plus but I am not
that bothered.

However, my problem is that I am distributing the .exe without any
install. Because of this I cannot use any third party DLL's or
add-ins, so all/any code must be VB and compiled into my .exe

I saw that there is zip library made in C# which is no good because I
cannot add a C# project to my solution, nor include an extra DLL. Does
anyone know if this project was translated to VB? If not, any ideas,
help at all?

TIA,
Hugh

p.s. I am using VB.NET 2003. I read somewhere that .NET 2.0 framework
has a class for this but I am stuck with version 1.1 !
 
Ken said:
Hi,

If you use the sharpziplib you would not have to register the
dll just copy it to the directory with your exe. A setup program would not
be needed.

http://msdn.microsoft.com/msdnmag/issues/03/06/ZipCompression/

Ken

Thanks Ken, I had originally thought of this but one of the
requirements of the app is that it is all contained in 1 exe and has no
dependencies at all. So that rules sharpziplib out I am afraid.
I am guessing I want to stream the contents of all the files into 1 big
file. And then work out how to get this info back out. Is this even
feasible? I am totally stumped on this problem.
 
Maybe you could 'read' all the files into one big byte array, then create a
memory stream from this byte array.... just a thought, but watch out for
memory usages.
 
Back
Top