Add coder/decoder size to coder
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user