Example #1
0
File: armor.go Project: qbit/client
// newArmorDecoderStream is used to decode armored encoding. It returns a stream you
// can read from, and also a Frame you can query to see what the open/close
// frame markers were.
func newArmorDecoderStream(r io.Reader, params armorParams) (io.Reader, Frame, error) {
	fds := &framedDecoderStream{r: newPunctuatedReader(r, params.Punctuation), params: params}
	ret := basex.NewDecoder(params.Encoding, fds)
	return ret, fds, nil
}
Example #2
0
func (v *CmdBase62Decode) Run() error {
	_, err := io.Copy(os.Stdout, basex.NewDecoder(basex.Base62StdEncoding, os.Stdin))
	return err
}