<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Encoding on Samarthya</title><link>https://samarthya.me/tags/encoding/</link><description>Recent content in Encoding on Samarthya</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© Samarthya 2018-2026. All rights reserved.</copyright><lastBuildDate>Sat, 30 Jan 2021 12:00:00 +0000</lastBuildDate><atom:link href="https://samarthya.me/tags/encoding/index.xml" rel="self" type="application/rss+xml"/><item><title>GoLang: encoding</title><link>https://samarthya.me/posts/golang-encoding/</link><pubDate>Sat, 30 Jan 2021 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/golang-encoding/</guid><description>&lt;p&gt;Package encoding provide capabilities to convert data to and from byte-level and textual representations.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;encoding/gob&lt;/li&gt;&#10;&lt;li&gt;encoding/json, and&lt;/li&gt;&#10;&lt;li&gt;encoding/xml&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; The &lt;em&gt;gob&lt;/em&gt; is Go’s format for &lt;em&gt;serializing&lt;/em&gt; and &lt;em&gt;deserializing&lt;/em&gt;. The gob was tailored for communicating between two servers written in Go.&#10;&lt;/div&gt;&#10;&#10;&lt;ul&gt;&#10;&lt;li&gt;Only exported fields are encoded; zero values are not taken into account&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; Package gob manages streams of gobs – binary values exchanged between an Encoder (transmitter) and a Decoder (receiver).&#10;&lt;/div&gt;&#10;&#10;&#10;&lt;h2 class="relative group"&gt;Format GoB&#10; &lt;div id="format-gob" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#format-gob" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;Let’s create a simple Type &lt;code&gt;Blog&lt;/code&gt; and we will encode and decode it using the gob format.&lt;/p&gt;</description></item></channel></rss>