Implement blank ucs2 coder

This commit is contained in:
2024-07-31 13:07:09 +02:00
parent d0c868ca5c
commit 4c92723df0

View File

@@ -4,10 +4,16 @@ import "bytes"
type UCS2Coder struct{}
func (c *UCS2Coder) Encode(s string, buf *bytes.Buffer) {
func (c *UCS2Coder) Encode(s *string, buf *bytes.Buffer) error {
panic("UCS2 not implemented yet")
}
func (c *UCS2Coder) Decode(buf *bytes.Buffer) (string, error) {
panic("UCS2 not implemented yet")
}
func (c *UCS2Coder) Decode(buf *bytes.Buffer) string {
panic("UCS2 not implemented yet")
func (c UCS2Coder) EncodesInto(s *string) int {
return len(*s) * 2
}
func (c UCS2Coder) DecodesInto(buf *bytes.Buffer) int {
return buf.Len() / 2
}