File compression/expansion is about reducing the size of a file in terms
of bytes to a size that is manageable. There
are two main reasons for wanting to compress a file. These are:
Portability
In the early days of computing
files sizes were very small and graphics did not in fact feature.
These days documents can contain text, graphics, sound and even video.
The file size requirement therefore has increased dramatically. One
thing that has not changed however is the size of a floppy disc which has
remained the same at 1.44MB. Hence, how do you squeeze a file of
10MB onto a disc of size 1.44MB? The answer is that you compress the
file using "Zip" software. Zip software utilises special
mathematical techniques that eliminate repeatable unnecessary code within
a file. This effectively reduces the file size. The degree
of compression can vary from anything between 0% and 95% depending on the
nature of the original file. Compressions of between 70% and 90%
are typical though. Once the file has been zipped it can then be
copied onto a floppy disc and transported to another machine where it is
then un-zipped. Un-zipping returns the document to its exact
original format and there is no data loss or change in the overall
process. Zipped files can also be sent over the Internet as
attachments thus saving time. The software required to zip a file is
available from a number of sources and in some instances it is available
as freeware.
For use on the Internet
Because
the speed of data transfer over the Internet is typically quite slow it is
vital that all elements that make up a web page are as small as possible.
Graphics in particular need to be kept small and manageable (this is
changing with Broadband access) otherwise they
can take so long to download that the user does not wait and clicks to go
on to another page. To this end a number of graphic file formats
have been developed specifically for use over the Internet. *.gif
graphics were developed for this reason and
typical images are of the order of 1-20KB for a small picture. The
disc graphic shown here is 3KB file size. To achieve this small file
size the image quality is quite poor. If the image were scanned from
a magazine and saved in a format that is photo quality the file size could
be 300KB. In other words changing the format to a *.gif file has
reduced/compressed the file by a factor of 100. Clearly some loss of
quality has to be accepted. The other commonly used file format for
graphics on the Internet is *.jpg or *.jpeg. Here the file sizes are
marginally higher but the image quality is much better. It
should be noted than once a file has been compressed to a *.gif or *.jpg
file it can NOT be expanded back to its former size.
In addition to graphics text files can also be compressed for use over
the Internet by using Adobe Acrobat format. This is used in this course for the
Practical Exercises. Adobe Acrobat Distiller takes word processed
documents and typically reduces the file size of them by 80%-90% changing
them into *.pdf (portable document format) files. This means that
when the file is sent over the Internet it will be much quicker.
Adobe Acrobat Reader is then required to read the *.pdf file. Adobe
Acrobat Reader can also be used to print the *.pdf file. At this
point the file size is expanded to include all the information required
for printing the document as opposed to just viewing it. |