By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,793 Members | 1,257 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,793 IT Pros & Developers. It's quick & easy.

Packing Files

P: n/a
I have a number of different files which I would like to combine into
one file, which can later be separated into the individual files
again. In essence, a zip archive, only without the compression. I do
not wish to use any 3rd party components.

Are there any built-in methods for achieving this? (The VB6 property
bag did something similar?).

Thank in advance.

Apr 12 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"James Arnold" <ja****@gmail.comwrote in news:1176397918.684820.178930
@e65g2000hsc.googlegroups.com:
I have a number of different files which I would like to combine into
one file, which can later be separated into the individual files
again. In essence, a zip archive, only without the compression. I do
not wish to use any 3rd party components.
..NET resource files can store binary data. You can then stream the data
back to disk pretty easily.

Otherwise, you could always ZIP the files up with no compression. The J#
namespace has a ZIP compression library. Or SharpZipLib (free library) is
much better.
Apr 12 '07 #2

P: n/a
On 12 Apr, 19:57, Spam Catcher <spamhoney...@rogers.comwrote:
"James Arnold" <jar...@gmail.comwrote in news:1176397918.684820.178930
@e65g2000hsc.googlegroups.com:
I have a number of different files which I would like to combine into
one file, which can later be separated into the individual files
again. In essence, a zip archive, only without the compression. I do
not wish to use any 3rd party components.

.NET resource files can store binary data. You can then stream the data
back to disk pretty easily.

Otherwise, you could always ZIP the files up with no compression. The J#
namespace has a ZIP compression library. Or SharpZipLib (free library) is
much better.
I cannot use resource files as the content is generated by the program
at runtime.

My application creates a few files, which I want to pack into a single
file. This file is stored for later, where it is split back into the
originals. I would rather not have to use a zip library, with or
without compression.

I read through an article some time ago which showed how to append
files to an exe to extract later, which is the same principle - I just
do not want the exe :P Any ides without a 3rd party library?

Thanks again.

Apr 12 '07 #3

P: n/a
"James Arnold" <ja****@gmail.comwrote in
news:11**********************@n76g2000hsh.googlegr oups.com:
My application creates a few files, which I want to pack into a single
file. This file is stored for later, where it is split back into the
originals. I would rather not have to use a zip library, with or
without compression.
What's wrong with ZIP?

In that case XML? You can serialize the data to XML using B64 encoding?

I read through an article some time ago which showed how to append
files to an exe to extract later, which is the same principle - I just
do not want the exe :P Any ides without a 3rd party library?
..NET does have ZIP built in... so it's not really 3rd party (just that the
3rd party library is much better).
Apr 13 '07 #4

P: n/a
On 13 Apr, 04:03, Spam Catcher <spamhoney...@rogers.comwrote:
"James Arnold" <jar...@gmail.comwrote innews:11**********************@n76g2000hsh.google groups.com:
My application creates a few files, which I want to pack into a single
file. This file is stored for later, where it is split back into the
originals. I would rather not have to use a zip library, with or
without compression.

What's wrong with ZIP?

In that case XML? You can serialize the data to XML using B64 encoding?
I read through an article some time ago which showed how to append
files to an exe to extract later, which is the same principle - I just
do not want the exe :P Any ides without a 3rd party library?

.NET does have ZIP built in... so it's not really 3rd party (just that the
3rd party library is much better).
Using the SharpZipLib or alternatives is simply overkill.

I've ended up using a BinaryReader/Writer, which works perfectly. The
only issues I had were converting things like alpha bitmaps to byte
arrays but all sorted now using the Marshal.

Thank for the suggestions.

Apr 13 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.