fread and fwrite question



Hello. I was looking at the arithmetic coding files on the file
exchange (http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=5044&objectType=file)
nd I have a question about two of the files--not a question about the
arithmetic coding.

The two files are:
text.txt
and
compressed.txt

When I do:

fid = fopen(text.txt);
theText = fread(fid);

I correctly get the values that represent the text of the file loaded
into the variable theText. But when I do:

fid = fopen(compressed.txt);
theText = fread(fid);

then theText is an empty array! I know that it is not representative
of actual text codes, but shouldn't the file still be read into the
variable and give me an array with values that represent the default
precision of 'uint8'? It won't mean anything, but I didn't expect an
empty array.

Can someone explain to me why theText is an empty array and how I can
read in the binary data from compressed.txt into a variable?

Thanks!

Ken Fleisher
.