Network data compression: Difference between revisions
Mr. MacKenty (talk | contribs) No edit summary |
No edit summary |
||
(14 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[file:network.png|right|frame|Networks<ref>http://www.flaticon.com/</ref>]] | [[file:network.png|right|frame|Networks<ref>http://www.flaticon.com/</ref>]] | ||
== Why compression of data is often necessary when transmitting across a network == | |||
Compression of data is often necessary when transmitting across a network for several reasons: | |||
== A good video to help you understand this == | # 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. | ||
# 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. | |||
# 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. | |||
# 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 == | |||
The video below is used with gratitude from code.org<ref>https://www.youtube.com/watch?v=By30SCp-Tsw</ref> | The video below is used with gratitude from code.org<ref>https://www.youtube.com/watch?v=By30SCp-Tsw</ref> | ||
<br /> | <br /> | ||
Line 10: | Line 19: | ||
<html> | <html> | ||
<iframe width="560" height="315" src="https://www.youtube.com/embed/By30SCp-Tsw" frameborder="0" allowfullscreen></iframe> | <iframe width="560" height="315" src="https://www.youtube.com/embed/By30SCp-Tsw" frameborder="0" allowfullscreen></iframe> | ||
</html> | |||
== A much better video to help you understand it == | |||
This video below is used with gratitude from computerphile <ref>https://www.youtube.com/watch?v=Lto-ajuqW3w</ref> | |||
<br /> | |||
<html> | |||
<iframe width="560" height="315" src="https://www.youtube.com/embed/Lto-ajuqW3w" frameborder="0" allowfullscreen></iframe> | |||
</html> | </html> | ||
Compression has enabled information to be disseminated more rapidly. | Compression has enabled information to be disseminated more rapidly. | ||
== See Also == | |||
* [[OSI model]] | |||
* [[Data packet]] | |||
== Different types of compression == | |||
Lossy | * 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 == | |||
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.<ref>https://www.quora.com/What-is-difference-between-JPG-and-PNG</ref> | |||
== Standards == | == Standards == | ||
Line 57: | Line 69: | ||
<references /> | <references /> | ||
[[Category: | [[Category:networks]] | ||
[[Category: | [[Category:formative assessment]] |
Latest revision as of 18:22, 11 January 2023
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:
- 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.
- 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.
- 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.
- 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]
- ↑ http://www.flaticon.com/
- ↑ https://www.youtube.com/watch?v=By30SCp-Tsw
- ↑ https://www.youtube.com/watch?v=Lto-ajuqW3w
- ↑ https://www.quora.com/What-is-difference-between-JPG-and-PNG
- ↑ IB Diploma Programme Computer science guide (first examinations 2014). Cardiff, Wales, United Kingdom: International Baccalaureate Organization. January 2012.