Tag: encoding

Notes on Go Structure Tags

Go has a feature to create a user-defined type with struct. Go also allows the program to specify meta-information with structure field. This meta-information is called Tags. A tag usually helps in packaging/unpacking a user-defined type structure. package main import ( “encoding/json” “fmt” ) type Test struct { […]

Notes on String & Encoding Techniques

String and their encoding decide the languages the code can support. Introduction We have many languages and their symbols that need more than 8-bits (ASCII) for binary representation. Encoding adds semantics to a set of bytes. Unicode is a table of all characters and their numeric equivalent. Since […]

Why use Base64 Encoding?

What is Base64 encoding? Given a stream of binary bits, it will encode 6-bits to a character from a set of 2 pow 6 (64 chracters). Example “abcd”, the ASCII representation is 65666768. [1000001][1000010][1000011][1000100] Base64 would pics six continuous bits 100000|| 110000|| 101000|| 011100||0100xx here xx would be […]