{"id":92,"date":"2009-11-09T18:29:48","date_gmt":"2009-11-09T18:29:48","guid":{"rendered":"http:\/\/blog.danplanet.com\/wordpress\/?p=92"},"modified":"2012-02-09T16:15:49","modified_gmt":"2012-02-09T16:15:49","slug":"winlink-1988","status":"publish","type":"post","link":"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/","title":{"rendered":"All hail Winlink 1988!"},"content":{"rendered":"<p>Winlink 2000 is a hot topic in the amateur community right now.\u00a0 It provides a mechanism to access Internet email over several different transports, including an Internet connection, local V\/UHF packet radio, and long-distance HF Pactor.\u00a0 The idea is great, and in practice, it works reasonably well.\u00a0 There are a lot of complaints to be made about the design and implementation of the system, but at the end of the day, those guys put in the time, effort and money and made it work.<\/p>\n<p>One of the (many) complaints I have is their use of the ancient B2F forwarding protocol.\u00a0 It&#8217;s fine to use that over slow Pactor links (I suppose), but why aren&#8217;t we just using something like POP3 for the Internet hops?\u00a0 Rather silly, I think.\u00a0 Anyway, one of the design points of the B2F protocol is the use of an even more ancient compression algorithm called &#8220;lzhuf&#8221;.<\/p>\n<p>The algorithm and code for this was written in Japan in 1988 to run on a 16-bit machine.\u00a0 The source, and many disparate alterations since then are sprinkled around the Internet and are easy to find via google.\u00a0 However, most people use either the command-line LZHUF_1.EXE file that has been around forever, or the DLL-ized version that the Winlink applications deliver and use.\u00a0 This effectively limits its use to Windows machines (and dosemu-installed Linux boxes).\u00a0 When I tried to compile several of the variants under Linux, I found that the code makes a bunch of assumptions about type sizes and thus crashes and\/or fails to decode compressed text as a result.\u00a0 In fact, depending on where it fails, sometimes it runs off in an endless loop writing garbage to the output file until you kill it!<\/p>\n<p>After spending a lot of time trying to find someone who had fixed the code to compile on a modern 32-bit system, I finally found a copy of the source that would compile on my system with g++ and actually run properly. I found the updated source code <a href=\"http:\/\/www.cs.umu.se\/~isak\/Snippets\/lzhuf.c\">here<\/a> and have <a href=\"http:\/\/static.danplanet.com\/preserve\/lzhuf\/lzhuf.c\">archived<\/a> a copy of the source on my system, as well as a <a href=\"http:\/\/static.danplanet.com\/preserve\/lzhuf\/lzhuf\">static Linux binary<\/a> in case you don&#8217;t want to compile it yourself.\u00a0 If you run the binary with no arguments, it will print a usage message. <\/p>\n<p>Now, you might ask &#8220;Dan, why does Winlink 2000 use this old, unmaintained, fragile, and obscure compression algorithm?&#8221;.\u00a0 Well, in the days of freely available code, algorithms, and libraries to do advanced compression, encoding, etc, I can assure you that the top notch Winlink engineers have a good reason.\u00a0 &#8230;.Right?\u00a0 I figured that this obscure gem from the golden age of 4MHz PCs must be an undiscovered compression miracle, one that makes the extremely slow Pactor connections able to transfer data as efficiently as possible.\u00a0 So, I decided to compress some test files with lzhuf, as well as the freely-available-and-well-regarded gzip and bzip2 algorithms and compare the results.<\/p>\n<p>As input, I used the lzhuf source code itself, which is about 19KB in size.\u00a0 That&#8217;s a pretty good sized email even with a potential file attachment.\u00a0 Below are the results:<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tbody>\n<tr>\n<td align=\"center\">\u00a0Method<\/td>\n<td align=\"center\">Size <\/td>\n<td>\u00a0Reduced size by:<\/td>\n<\/tr>\n<tr>\n<td>\u00a0Uncompressed\u00a0 <\/td>\n<td>\u00a018,917 (19KB)\u00a0 <\/td>\n<td>\u00a0(n\/a)<\/td>\n<\/tr>\n<tr>\n<td>\u00a0lzhuf<\/td>\n<td>\u00a05,385 (5.3KB)\u00a0 <\/td>\n<td>\u00a072%<\/td>\n<\/tr>\n<tr>\n<td>\u00a0gzip<\/td>\n<td>\u00a04,903 (4.8KB)\u00a0 <\/td>\n<td>\u00a075%<\/td>\n<\/tr>\n<tr>\n<td>\u00a0bzip2<\/td>\n<td>\u00a04,589 (4.5KB)\u00a0 <\/td>\n<td>\u00a076%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>So there you go: with bzip2, you&#8217;d get almost a kilobyte less data to transfer than you would using lzhuf.\u00a0 Does a kilobyte really matter?\u00a0 Well, Pactor-I is 200 baud (at most), with very small block sizes.\u00a0 Yes, I think I&#8217;d rather save that kilobyte.<\/p>\n<p>So, I ask the Winlink 2000 developers: Why not move to bzip2 compression?\u00a0 It&#8217;s free.\u00a0 It&#8217;s widely available.\u00a0 It&#8217;s considered one of the best.\u00a0 You put &#8220;2000&#8221; in your name to sound like the system is new, fresh, and modern, why not use a compression algorithm to match? <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Winlink 2000 is a hot topic in the amateur community right now.\u00a0 It provides a mechanism to access Internet email over several different transports, including an Internet connection, local V\/UHF packet radio, and long-distance HF Pactor.\u00a0 The idea is great, &hellip; <a href=\"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[74,73],"class_list":["post-92","post","type-post","status-publish","format-standard","hentry","category-radio","tag-d-rats","tag-winlink"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>All hail Winlink 1988! - Right Angles<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"All hail Winlink 1988! - Right Angles\" \/>\n<meta property=\"og:description\" content=\"Winlink 2000 is a hot topic in the amateur community right now.\u00a0 It provides a mechanism to access Internet email over several different transports, including an Internet connection, local V\/UHF packet radio, and long-distance HF Pactor.\u00a0 The idea is great, &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/\" \/>\n<meta property=\"og:site_name\" content=\"Right Angles\" \/>\n<meta property=\"article:published_time\" content=\"2009-11-09T18:29:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-02-09T16:15:49+00:00\" \/>\n<meta name=\"author\" content=\"Dan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/\"},\"author\":{\"name\":\"Dan\",\"@id\":\"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c\"},\"headline\":\"All hail Winlink 1988!\",\"datePublished\":\"2009-11-09T18:29:48+00:00\",\"dateModified\":\"2012-02-09T16:15:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/\"},\"wordCount\":634,\"publisher\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c\"},\"keywords\":[\"d-rats\",\"winlink\"],\"articleSection\":[\"Radio\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/\",\"url\":\"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/\",\"name\":\"All hail Winlink 1988! - Right Angles\",\"isPartOf\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/#website\"},\"datePublished\":\"2009-11-09T18:29:48+00:00\",\"dateModified\":\"2012-02-09T16:15:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.danplanet.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"All hail Winlink 1988!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.danplanet.com\/blog\/#website\",\"url\":\"https:\/\/www.danplanet.com\/blog\/\",\"name\":\"Right Angles\",\"description\":\"If they&#039;re not right...they&#039;re wrong\",\"publisher\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.danplanet.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c\",\"name\":\"Dan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9b73782704be64dd8c030087af2d1ae0c1dc488cad69093ff0366dbaad2de673?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9b73782704be64dd8c030087af2d1ae0c1dc488cad69093ff0366dbaad2de673?s=96&d=mm&r=g\",\"caption\":\"Dan\"},\"logo\":{\"@id\":\"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.danplanet.com\/blog\/author\/dan\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"All hail Winlink 1988! - Right Angles","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/","og_locale":"en_US","og_type":"article","og_title":"All hail Winlink 1988! - Right Angles","og_description":"Winlink 2000 is a hot topic in the amateur community right now.\u00a0 It provides a mechanism to access Internet email over several different transports, including an Internet connection, local V\/UHF packet radio, and long-distance HF Pactor.\u00a0 The idea is great, &hellip; Continue reading &rarr;","og_url":"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/","og_site_name":"Right Angles","article_published_time":"2009-11-09T18:29:48+00:00","article_modified_time":"2012-02-09T16:15:49+00:00","author":"Dan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Dan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/#article","isPartOf":{"@id":"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/"},"author":{"name":"Dan","@id":"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c"},"headline":"All hail Winlink 1988!","datePublished":"2009-11-09T18:29:48+00:00","dateModified":"2012-02-09T16:15:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/"},"wordCount":634,"publisher":{"@id":"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c"},"keywords":["d-rats","winlink"],"articleSection":["Radio"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/","url":"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/","name":"All hail Winlink 1988! - Right Angles","isPartOf":{"@id":"https:\/\/www.danplanet.com\/blog\/#website"},"datePublished":"2009-11-09T18:29:48+00:00","dateModified":"2012-02-09T16:15:49+00:00","breadcrumb":{"@id":"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.danplanet.com\/blog\/2009\/11\/09\/winlink-1988\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.danplanet.com\/blog\/"},{"@type":"ListItem","position":2,"name":"All hail Winlink 1988!"}]},{"@type":"WebSite","@id":"https:\/\/www.danplanet.com\/blog\/#website","url":"https:\/\/www.danplanet.com\/blog\/","name":"Right Angles","description":"If they&#039;re not right...they&#039;re wrong","publisher":{"@id":"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.danplanet.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/0f6920aa6d63cae437bf8b122200287c","name":"Dan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9b73782704be64dd8c030087af2d1ae0c1dc488cad69093ff0366dbaad2de673?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9b73782704be64dd8c030087af2d1ae0c1dc488cad69093ff0366dbaad2de673?s=96&d=mm&r=g","caption":"Dan"},"logo":{"@id":"https:\/\/www.danplanet.com\/blog\/#\/schema\/person\/image\/"},"url":"https:\/\/www.danplanet.com\/blog\/author\/dan\/"}]}},"_links":{"self":[{"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/posts\/92","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/comments?post=92"}],"version-history":[{"count":1,"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/posts\/92\/revisions"}],"predecessor-version":[{"id":229,"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/posts\/92\/revisions\/229"}],"wp:attachment":[{"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/media?parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/categories?post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.danplanet.com\/blog\/wp-json\/wp\/v2\/tags?post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}