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
+12.2k Golang : Detect user location with HTML5 geo-location
+9.9k Golang : Turn string or text file into slice example
+5.3k Golang : How to deal with configuration data?
+25.7k Golang : How to write CSV data to file
+10k Golang : Convert octal value to string to deal with leading zero problem
+5.3k Golang : Get FX sentiment from website example
+4.4k Linux/MacOSX : Search and delete files by extension
+11.2k Golang : Calculate Relative Strength Index(RSI) example
+8.8k Golang : On lambda, anonymous, inline functions and function literals
+5.4k Golang : Qt update UI elements with core.QCoreApplication_ProcessEvents
+14.8k Golang : Normalize unicode strings for comparison purpose
+6.7k Golang : Derive cryptographic key from passwords with Argon2