Golang encoding/ascii85.NewDecoder function example
package encoding/ascii85
NewDecoder constructs a new ascii85 stream decoder.
Golang encoding/ascii85.NewDecoder function usage example
package main
import (
"encoding/ascii85"
"fmt"
"strings"
"io/ioutil"
)
func main() {
var str string
str = "9jqo^BlbD-BleB1DJ+*+F(f,q/0JhKF<GL>Cj@.4Gp$d7F!,L7@<6@)/0JDEF<G%<+EV:2F!,\n"
decoderstream := ascii85.NewDecoder(strings.NewReader(str))
dstreambuf, err := ioutil.ReadAll(decoderstream)
if err != nil {
fmt.Println(err)
}
fmt.Println(string(dstreambuf))
}
Output :
Man is distinguished, not only by his reason, but by this
Reference :
Advertisement
Something interesting
Tutorials
+15.6k Golang : ROT47 (Caesar cipher by 47 characters) example
+7.9k Javascript : Put image into Chrome browser's console
+24.5k Golang : Change file read or write permission example
+8k Golang : Sort words with first uppercase letter
+7.9k Golang : Trim everything onward after a word
+10.4k Golang : Simple Jawi(Yawi) to Rumi(Latin/Romanize) converter
+14.4k Android Studio : Use image as AlertDialog title with custom layout example
+18.5k Golang : Example for RSA package functions
+17.9k Golang : Login and logout a user after password verification and redirect example
+35.9k Golang : Integer is between a range