Add coder/decoder size to coder

This commit is contained in:
2024-07-31 13:05:13 +02:00
parent 7001f2c51a
commit d0c868ca5c
4 changed files with 22 additions and 13 deletions

View File

@@ -13,3 +13,10 @@ func (c *ASCIICoder) Encode(s *string, buf *bytes.Buffer) error {
func (c *ASCIICoder) Decode(buf *bytes.Buffer) (string, error) {
return buf.String(), nil
}
func (c ASCIICoder) EncodesInto(s *string) int {
return len(*s)
}
func (c ASCIICoder) DecodesInto(buf *bytes.Buffer) int {
return buf.Len()
}