{"id":4136,"date":"2013-06-13T23:00:43","date_gmt":"2013-06-14T06:00:43","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=4136"},"modified":"2013-06-13T23:00:43","modified_gmt":"2013-06-14T06:00:43","slug":"making-sure-the-png-gets-there","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/","title":{"rendered":"Making Sure The PNG Gets There"},"content":{"rendered":"<p>Rewind to 1999. I was developing an HTTP-based remote management interface for an embedded device. The device sat on an ethernet LAN and you could point a web browser at it. The pitch was to transmit an image of the device&#8217;s touch screen and the user could click on the picture to interact with the device. So we needed an image format. If you were computing at the time, you know that the web was insufferably limited back then. Our choice basically came down to GIF and JPEG. Being the office&#8217;s annoying free software zealot, I was championing a little known up and coming format named PNG.<\/p>\n<p>So the challenge was to create our own PNG encoder (incorporating a library like libpng wasn&#8217;t an option for this platform). I seem to remember being annoyed at having to implement an integrity check (CRC) for the PNG encoder. It&#8217;s part of the PNG spec, after all. It just seemed so redundant. At the time, I reasoned that there were 5 layers of integrity validation in play.<\/p>\n<p>I don&#8217;t know why, but I was reflecting on this episode recently and decided to revisit it. Here are all the encapsulation layers of a PNG file when flung over an ethernet network:<\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2013\/06\/png-network-encapsulation-300x193.png\" alt=\"PNG Network Encapsulation\" width=\"300\" height=\"193\" class=\"aligncenter size-medium wp-image-4137\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2013\/06\/png-network-encapsulation-300x193.png 300w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2013\/06\/png-network-encapsulation.png 367w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><br \/>\n<\/center><\/p>\n<p>So there are up to 5 encapsulations for the data in this situation. At the innermost level is the image data which is compressed with the zlib DEFLATE method. At first, I thought that this also had a CRC or checksum. However, in researching this post, I couldn&#8217;t find any evidence of such an integrity check. Further, I don&#8217;t think we bothered to compress the PNG data in this project long ago. It was a small image, monochrome, and transferring via LAN, so the encoder could get away with signaling uncompressed data.<\/p>\n<p>The graphical data gets wrapped up in a PNG chunk and all PNG chunks have a CRC. To transmit via the network, it goes into a TCP frame, which also has a checksum. That goes into an IP packet. I previously believed that this represented another integrity check. While an IP frame does have a checksum, the checksum only covers the IP header and not the payload. So that doesn&#8217;t really count towards this goal.<\/p>\n<p>Finally, the data gets encapsulated into an ethernet frame which has &#8212; you guessed it &#8212; a CRC.<\/p>\n<p>I see that other link layer protocols like PPP and wireless ethernet (802.11) also feature frame CRCs. So I guess what I&#8217;m saying is that, if you transfer a PNG file over the network, you can be confident that the data will be free of any errors.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Studying all the layers of integrity verification in sending a simple image over the network<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4136","post","type-post","status-publish","format-standard","hentry","category-general"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Studying all the layers of integrity verification in sending a simple image over the network\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Multimedia Mike\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Making Sure The PNG Gets There | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta property=\"og:description\" content=\"Studying all the layers of integrity verification in sending a simple image over the network\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2013-06-14T06:00:43+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2013-06-14T06:00:43+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Making Sure The PNG Gets There | Breaking Eggs And Making Omelettes\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Studying all the layers of integrity verification in sending a simple image over the network\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/making-sure-the-png-gets-there\\\/#article\",\"name\":\"Making Sure The PNG Gets There | Breaking Eggs And Making Omelettes\",\"headline\":\"Making Sure The PNG Gets There\",\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"http:\\\/\\\/multimedia.cx\\\/eggs\\\/wp-content\\\/uploads\\\/2013\\\/06\\\/png-network-encapsulation-300x193.png\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/making-sure-the-png-gets-there\\\/#articleImage\"},\"datePublished\":\"2013-06-13T23:00:43-07:00\",\"dateModified\":\"2013-06-13T23:00:43-07:00\",\"inLanguage\":\"en-US\",\"commentCount\":7,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/making-sure-the-png-gets-there\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/making-sure-the-png-gets-there\\\/#webpage\"},\"articleSection\":\"General\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/making-sure-the-png-gets-there\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/general\\\/#listItem\",\"name\":\"General\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/general\\\/#listItem\",\"position\":2,\"name\":\"General\",\"item\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/general\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/making-sure-the-png-gets-there\\\/#listItem\",\"name\":\"Making Sure The PNG Gets There\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/making-sure-the-png-gets-there\\\/#listItem\",\"position\":3,\"name\":\"Making Sure The PNG Gets There\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/category\\\/general\\\/#listItem\",\"name\":\"General\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/\",\"name\":\"Multimedia Mike\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/making-sure-the-png-gets-there\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Multimedia Mike\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/making-sure-the-png-gets-there\\\/#webpage\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/making-sure-the-png-gets-there\\\/\",\"name\":\"Making Sure The PNG Gets There | Breaking Eggs And Making Omelettes\",\"description\":\"Studying all the layers of integrity verification in sending a simple image over the network\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/making-sure-the-png-gets-there\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/author\\\/multimedia-mike\\\/#author\"},\"datePublished\":\"2013-06-13T23:00:43-07:00\",\"dateModified\":\"2013-06-13T23:00:43-07:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#website\",\"url\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/\",\"name\":\"Breaking Eggs And Making Omelettes\",\"description\":\"Topics On Multimedia Technology and Reverse Engineering\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/multimedia.cx\\\/eggs\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Making Sure The PNG Gets There | Breaking Eggs And Making Omelettes","description":"Studying all the layers of integrity verification in sending a simple image over the network","canonical_url":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/#article","name":"Making Sure The PNG Gets There | Breaking Eggs And Making Omelettes","headline":"Making Sure The PNG Gets There","author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"},"image":{"@type":"ImageObject","url":"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2013\/06\/png-network-encapsulation-300x193.png","@id":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/#articleImage"},"datePublished":"2013-06-13T23:00:43-07:00","dateModified":"2013-06-13T23:00:43-07:00","inLanguage":"en-US","commentCount":7,"mainEntityOfPage":{"@id":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/#webpage"},"isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/#webpage"},"articleSection":"General"},{"@type":"BreadcrumbList","@id":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","position":1,"name":"Home","item":"https:\/\/multimedia.cx\/eggs","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/general\/#listItem","name":"General"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/general\/#listItem","position":2,"name":"General","item":"https:\/\/multimedia.cx\/eggs\/category\/general\/","nextItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/#listItem","name":"Making Sure The PNG Gets There"},"previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/#listItem","position":3,"name":"Making Sure The PNG Gets There","previousItem":{"@type":"ListItem","@id":"https:\/\/multimedia.cx\/eggs\/category\/general\/#listItem","name":"General"}}]},{"@type":"Organization","@id":"https:\/\/multimedia.cx\/eggs\/#organization","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","url":"https:\/\/multimedia.cx\/eggs\/"},{"@type":"Person","@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author","url":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/","name":"Multimedia Mike","image":{"@type":"ImageObject","@id":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/2eb93f7cada658f7986b5092062849fa255779eada3342c8f6b9a40764b95fdd?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Multimedia Mike"}},{"@type":"WebPage","@id":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/#webpage","url":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/","name":"Making Sure The PNG Gets There | Breaking Eggs And Making Omelettes","description":"Studying all the layers of integrity verification in sending a simple image over the network","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/multimedia.cx\/eggs\/#website"},"breadcrumb":{"@id":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/#breadcrumblist"},"author":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"creator":{"@id":"https:\/\/multimedia.cx\/eggs\/author\/multimedia-mike\/#author"},"datePublished":"2013-06-13T23:00:43-07:00","dateModified":"2013-06-13T23:00:43-07:00"},{"@type":"WebSite","@id":"https:\/\/multimedia.cx\/eggs\/#website","url":"https:\/\/multimedia.cx\/eggs\/","name":"Breaking Eggs And Making Omelettes","description":"Topics On Multimedia Technology and Reverse Engineering","inLanguage":"en-US","publisher":{"@id":"https:\/\/multimedia.cx\/eggs\/#organization"}}]},"og:locale":"en_US","og:site_name":"Breaking Eggs And Making Omelettes | Topics On Multimedia Technology and Reverse Engineering","og:type":"article","og:title":"Making Sure The PNG Gets There | Breaking Eggs And Making Omelettes","og:description":"Studying all the layers of integrity verification in sending a simple image over the network","og:url":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/","article:published_time":"2013-06-14T06:00:43+00:00","article:modified_time":"2013-06-14T06:00:43+00:00","twitter:card":"summary","twitter:title":"Making Sure The PNG Gets There | Breaking Eggs And Making Omelettes","twitter:description":"Studying all the layers of integrity verification in sending a simple image over the network"},"aioseo_meta_data":{"post_id":"4136","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-31 21:42:25","updated":"2025-12-31 19:45:49","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/multimedia.cx\/eggs\/category\/general\/\" title=\"General\">General<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMaking Sure The PNG Gets There\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/multimedia.cx\/eggs"},{"label":"General","link":"https:\/\/multimedia.cx\/eggs\/category\/general\/"},{"label":"Making Sure The PNG Gets There","link":"https:\/\/multimedia.cx\/eggs\/making-sure-the-png-gets-there\/"}],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/4136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=4136"}],"version-history":[{"count":3,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/4136\/revisions"}],"predecessor-version":[{"id":4140,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/4136\/revisions\/4140"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=4136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=4136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=4136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}