Home All Groups Group Topic Archive Search About

Compressing textfiles, but still read them

Author
19 Oct 2006 3:14 PM
Jarry
I am a bit new to VB, and I have set up a program which loads a large
text file. The text file (.txt) has a file size of around 6 megabytes.
This is the figure I would like to rreduce. I have limited space on a
server, and this is a  considerable chunk. anyhow, is there a file
extension which would reduce the .txt file size down, but that could
still be read by a stream reader. Thanks, Jarry

Author
19 Oct 2006 3:27 PM
Michael D. Ober
Immediate workaround:

Where is this file stored?  If it is on a Windows NTFS drive, compress the
directory it's in using the directory property pages.  Text files are highly
compressable.  Doing it this way hides the compression from your
application.

Better Solution:

Add a large data drive to the server and move the file shares to it.  This
has the benefit of protecting your data files in the case you have to
reformat the system disk.

Mike Ober.

Show quoteHide quote
"Jarry" <HarryandJa***@gmail.com> wrote in message
news:1161270896.526068.312190@b28g2000cwb.googlegroups.com...
>I am a bit new to VB, and I have set up a program which loads a large
> text file. The text file (.txt) has a file size of around 6 megabytes.
> This is the figure I would like to rreduce. I have limited space on a
> server, and this is a  considerable chunk. anyhow, is there a file
> extension which would reduce the .txt file size down, but that could
> still be read by a stream reader. Thanks, Jarry
>
Author
19 Oct 2006 5:27 PM
Spam Catcher
"Jarry" <HarryandJa***@gmail.com> wrote in news:1161270896.526068.312190
@b28g2000cwb.googlegroups.com:

> I am a bit new to VB, and I have set up a program which loads a large
> text file. The text file (.txt) has a file size of around 6 megabytes.
> This is the figure I would like to rreduce. I have limited space on a
> server, and this is a  considerable chunk. anyhow, is there a file
> extension which would reduce the .txt file size down, but that could
> still be read by a stream reader. Thanks, Jarry


Zip your files - when you need to read the files, unzip the files to a
memorystream rather than an file/disk stream : )

http://www.icsharpcode.net/OpenSource/SharpZipLib