The success of the internet is very much because of the adoption of uniform standards. This allows communication between devices of different specifications and from many different manufacturers. The World Wide Web has its own standards and HTML forms the basis of all web pages. Essentially, each web page is a plain text document. The html code contains instructions that tell browsers how to display the content. These instructions are usually in the form of tags that are arranged in pairs, within angle brackets. For example, <H1> tells the browser to display what follows in a top level (large) heading type and </H1> indicates to turn that type off again.
In order that as much content as possible can be successfully displayed in browsers, various file standards have become common for documents, image and sound files. Some of these involve compression. This is necessary in order to reduce upload and download times for what might otherwise be very large files. A single colour image taking up a typical computer screen can be 1 MB or more. A reasonable quality movie will display 25 images per second. It is easy to see that files can become extremely large. Even with fast broadband, uploads and downloads can take a long time and be unacceptably slow.
There are two principal approaches to compressing files and they vary in how much data is lost in order to reduce file sizes.
This involves removing some of the data from a file in order to reduce its size. For photographs, it is the only method that can achieve significant file reductions because the sequence of pixels is unpredictable. Lossy compression relies on the removal of data that is the least likely to be noticed by the human senses. A file that has been compressed using lossy compression cannot be restored to its original condition.
This involves storing enough information about a file so that it can later be recreated exactly as it was before. For example, consider the sentence:
“I’m not a pheasant plucker I’m a pheasant plucker’s son”