This program makes a Histogram of the byte contents of a file. It reads a file and counts the bytes inside that file. Then it places the counted bytes in a graph with one bar for each byte. The longest bar represents the highest number of bytes. It starts with byte $00 on the left side and ends wit $FF on the right.
The program has not a real practical use. It gives an impression how it looks inside a file and how much is inside. It's interesting to see the differences among the file types on a disk.
At the right there are some images with a typical histogram of some popular files.
Very special are the files from Microsoft, they look almost empty. Look at the DOC, XLS, PPT and BMP files and see how inefficient they use the disk space.
This overview shows something everyone knows already, zipped files are smaller then normal files.
However, in this overview all the File Histograms can be viewed by clicking on the file size.
Fname | Size | Zipped | Ratio | MS Format |
---|---|---|---|---|
bmp.bmp | 261'494 | 9'579 | 96 | y |
doc.doc | 264'192 | 104'239 | 61 | y |
exe.exe | 266'240 | 102'083 | 62 | y |
gif.gif | 310'097 | 304'746 | 2 | n |
jpg.jpg | 262'985 | 253'952 | 3 | n |
pdf.pdf | 259'924 | 232'955 | 10 | n |
txt.txt | 264'572 | 75'018 | 72 | n |
xls.xls | 250'880 | 78'947 | 69 | y |
zip.zip | 268'476 | 267'236 | 1 | n |
It can be seen that typical Microsoft files are more or less "empty". There is almost nothing inside. That is the reason that they can be zipped with a very high compression ratio. Please note that all files in this example have a size of about 260.000 bytes.
The menu has four main selections:
File is used to open a file, to exit the program and to save the counted bytes in a *.FHN file. This a normal txt file with a special extension. Inside it contains a list of bytes and their counted values.
Text shows the collected data in a grid. If a cell of the grid is selected then the character value and the number of bytes is shown in the lower right corner of the screen.
Graph shows the counted bytes in a graph. If the mouse pointer is exactly above a bar, then at the bottom right some information about the selected byte is shown.
Help brings up the help file with all information about this program, a direct connection to my site and the History and About pages in this help file
The program file and the help file can be copied to any convenient place on a Windows computer. No additional files or DLL's are needed.
Updated 2007 Oct. 09