Add ascii encoding
This commit is contained in:
13
encoding/ascii.go
Normal file
13
encoding/ascii.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package encoding
|
||||
|
||||
import "bytes"
|
||||
|
||||
type ASCIICoder struct{}
|
||||
|
||||
func (c *ASCIICoder) Encode(s string, buf *bytes.Buffer) {
|
||||
buf.WriteString(s)
|
||||
}
|
||||
|
||||
func (c *ASCIICoder) Decode(buf *bytes.Buffer) string {
|
||||
return buf.String()
|
||||
}
|
Reference in New Issue
Block a user