Network data compression

From Computer Science Wiki
Networks[1]

Why compression of data is often necessary when transmitting across a network[edit]

Compression of data is often necessary when transmitting across a network for several reasons:

  1. Reducing bandwidth requirements: Compressing data can reduce the amount of data that needs to be transmitted, which can help to reduce the amount of bandwidth required to transmit the data. This can be particularly important when transmitting data over a network with limited bandwidth, such as a cellular network or a satellite connection.
  2. Improving transmission speeds: Compressing data can also reduce the amount of time it takes to transmit the data, as there is less data to transmit. This can improve the overall speed and performance of the network.
  3. Reducing storage requirements: Compressing data can also reduce the amount of storage space required to store the data, which can be beneficial for both the sender and the receiver of the data.
  4. Reducing costs: Reducing the amount of data that needs to be transmitted or stored can also help to reduce costs, such as the costs of bandwidth or storage.

In summary, compression of data is often necessary when transmitting across a network to reduce bandwidth requirements, improve transmission speeds, reduce storage requirements, and reduce costs.


A good INTRODUCTORY video to help you understand this[edit]

The video below is used with gratitude from code.org[2]

A much better video to help you understand it[edit]

This video below is used with gratitude from computerphile [3]

Compression has enabled information to be disseminated more rapidly.

See Also[edit]

Different types of compression[edit]

  • Lossy: the compressed file cannot be restored to the original file
  • Lossless: the compressed file CAN be restored to the original file

Difference between JPG and PNG[edit]

One of my students asked this question. I like the answer below.

JPG aka JPEG is a standard of the Joint Photo Experts Group and works great for photographs. It doesn’t work well for line art or text, is optimum for photos that will be seen in browsers or on phones.

JPG allows ‘compression’ so an image’s file-size can be reduced by a scheme that takes surrounding pixels and ‘averages’ them into a larger spot so the result is a somewhat coarser looking photo but a smaller file size.

JPG compression is called ‘lossy’ because you can lose all the quality of an image if you compress it too much. _Some_ compression can greatly reduce the file size, and bandwidth for downloading to a browser, without making any noticeable difference. Too much compression and it looks ‘pixelated’.

JPEGs don’t support transparency so the effect is always a photo with squared edges.

PNG is a somewhat later standard. It can make a spectacular photo, but the file-size is larger relative to the same photo in a jpg. PNG is compressible, too, but the algorithm will not compress the quality out of the image, so it’s always safe to specify max compression.

PNGs can also handle line art and text and keep the sharp edges. The PNG compression algorithm works really well for line art or text with solid-color backgrounds. It doesn’t reduce the file size much if it’s a busy graphic but can reduce it dramatically with line art and maintain the quality.

PNGs can support transparency by adding an ‘alpha channel’, another 8 bits per pixel, that holds the opacity for that pixel. By making backgrounds transparent, graphics can appear to have irregular edges on any background.

GIFs work well for graphics that are generated with a drawing tool, but have a very limited pallette and don’t work well for photos or scanned documents. GIFs can support transparency, and the can also be animated. BMP or ‘bit maps’ are seldom used for anything except little doodads, button faces, or other smaller graphics.

JPEG, PNG, GIF, or BMP are ‘web graphics formats’ and work well for stuff seen in a browser or on a phone where the effective resolution is only something like 100 dots per inch and images are relatively small.[4]

Standards[edit]

These standards are used from the IB Computer Science Subject Guide[5]

  • Explain why compression of data is often necessary when transmitting across a network.

References[edit]

  1. http://www.flaticon.com/
  2. https://www.youtube.com/watch?v=By30SCp-Tsw
  3. https://www.youtube.com/watch?v=Lto-ajuqW3w
  4. https://www.quora.com/What-is-difference-between-JPG-and-PNG
  5. IB Diploma Programme Computer science guide (first examinations 2014). Cardiff, Wales, United Kingdom: International Baccalaureate Organization. January 2012.