development

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 { // json tags indicate the key name […]

Read more
development

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 there are more than 100k symbols, 8-bits […]

Read more
signals, systems

The most efficient Image format- WebP?

The most efficient Image format- WebP? I always knew that PNG followed by JPEG were the most efficnent, lossy image compression format. However, there is a new image format, webP. It is developed by Google and comes in lossy as well as lossless format. How is it better than PNG/JPEG? The webP image is ~30% […]

Read more
ascii, base64, development, encoding

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 00 (padding) gwocQ Why use base64 encoding? […]

Read more