Add ascii encoding

This commit is contained in:
2024-07-25 16:30:02 +02:00
parent 7bcc02c66d
commit 161ff14189
5 changed files with 97 additions and 0 deletions

13
encoding/ascii.go Normal file
View 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()
}