Re: compressing a text file
- From: jgarayua@xxxxxxxxx
- Date: 20 Apr 2006 15:42:21 -0700
Sure you can. Just use the other 128 character (128 to 255). In a
native text file you are using only 128 characters. You can first scan
your file and see how often each character appears and how many of the
255 character are present. Then use the characters that are not present
to represent the frecuency of other characters.
Actually there are algorithms that are based on the same techniques to
compress files, you can do some research before attempting to do
anything else.
Good luck...
junky_fellow@xxxxxxxxxxx wrote:
HI guys,
I am new to the field of data compression. I want to write an
algorithm to compress
the text file. One way I thought of replacing the frequently occuring
words with a smaller
symbol. Say, for example if "the" is repeated in the text file 1000
times I would replace
"the" with a new symbol "@" at all the 1000 places.
But there is a possibility that the new symbol "@" is already present
at some places
in the text file. So, I may mistook it as "the". Can anyone suggest me
how to solve
this problem ?
Thanx for any help/hints in advance ...
.
- References:
- compressing a text file
- From: junky_fellow@xxxxxxxxxxx
- compressing a text file
- Prev by Date: Re: compressing a text file
- Next by Date: Re: 12 bits grayscale codec
- Previous by thread: Re: compressing a text file
- Next by thread: Re: compressing a text file
- Index(es):
Relevant Pages
|
|