예제 #1
0
파일: armor.go 프로젝트: mark-adams/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
}
예제 #2
0
func (v *CmdBase62Decode) Run() error {
	_, err := io.Copy(os.Stdout, basex.NewDecoder(basex.Base62StdEncoding, os.Stdin))
	return err
}