{"id":1089,"date":"2010-07-01T10:38:30","date_gmt":"2010-07-01T10:38:30","guid":{"rendered":"http:\/\/www.codingfriends.com\/?p=1089"},"modified":"2011-01-14T13:34:03","modified_gmt":"2011-01-14T13:34:03","slug":"huffman-coding-part-2","status":"publish","type":"post","link":"https:\/\/www.codingfriends.com\/index.php\/2010\/07\/01\/huffman-coding-part-2\/","title":{"rendered":"Huffman coding &#8211; part 2"},"content":{"rendered":"<p><span id=\"zipfile\"><a href=\"http:\/\/www.codingfriends.com\/wp-content\/uploads\/2010\/07\/assn-5-huffman-pc.zip\"><\/a><\/span>The huffman coding is mainly used to compress files that are not already compressed already ( the reason why I say this for is because if you are trying to compress a already compressed file then the assignment 5 will add on more header details onto the file for decompressing the compressed file.<\/p>\n<p>This is a follow on from the part 1 of the <a href=\"http:\/\/www.codingfriends.com\/index.php\/2010\/07\/01\/cs106b-assignment-5-huffman-coding-part-1\/\">assignment 5<\/a> this is the decompression of the compressed file.<\/p>\n<p>So to start with, I need to read in the header file of the compressed file. For example if I was going to compress the file<\/p>\n<pre lang=\"text\">\r\nhello there<\/pre>\n<p>then the compressed file will be <\/p>\n<pre lang=\"text\">\n104=2|101=3|108=2|111=1|32=1|116=1|114=1|-1=1|;u<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The huffman coding is mainly used to compress files that are not already compressed already ( the reason why I say this for is because if you are trying to compress a already compressed file then the assignment 5 will add on more header details onto the file for decompressing the compressed file. This is &hellip; <a href=\"https:\/\/www.codingfriends.com\/index.php\/2010\/07\/01\/huffman-coding-part-2\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Huffman coding &#8211; part 2<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[236],"class_list":["post-1089","post","type-post","status-publish","format-standard","hentry","category-c_and_cpp","tag-huffman"],"_links":{"self":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/1089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/comments?post=1089"}],"version-history":[{"count":6,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/1089\/revisions"}],"predecessor-version":[{"id":1308,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/1089\/revisions\/1308"}],"wp:attachment":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/media?parent=1089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/categories?post=1089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/tags?post=1089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}