473,396 Members | 1,913 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Compressing textfiles, but still read them

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

Oct 19 '06 #1
2 1092
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.

"Jarry" <Ha***********@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.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

Oct 19 '06 #2
"Jarry" <Ha***********@gmail.comwrote 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
Oct 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jorgen Gustafsson | last post by:
Hi, im trying to write a small progam to compare data in 2 textfiles. I want to search for values that doesnt exist in File2. The result should be "3" in the example below but Im not able to do...
6
by: Junkmail | last post by:
I have an application with highly compressable strings (gzip encoding usually does somewhere between 20-50X reduction.) My base 350MB database is mostly made up of these slowly (or even static)...
7
by: jamait | last post by:
Hi all, I m trying to read in a text file into a datatable... Not sure on how to split up the information though, regex or substrings...? sample: Col1 Col2 ...
14
by: jamait | last post by:
Hi all, I m trying to read in a text file into a datatable... Not sure on how to split up the information though, regex or substrings...? sample: Col1 Col2 ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.