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
+7.9k Golang : Grayscale Image
+15.2k Golang : How to check if IP address is in range
+8.4k Golang : Convert word to its plural form example
+17.6k Golang : Parse date string and convert to dd-mm-yyyy format
+4.8k Which content-type(MIME type) to use for JSON data
+5.9k Golang : Denco multiplexer example
+4.6k Mac OSX : Get disk partitions' size, type and name
+5.3k Golang : Pad file extension automagically
+14.6k Golang : GUI with Qt and OpenCV to capture image from camera
+7.4k Golang : Scanf function weird error in Windows
+5.2k Python : Create Whois client or function example