diff --git a/codec/encode.go b/codec/encode.go index a18febd..bbfbd6b 100644 --- a/codec/encode.go +++ b/codec/encode.go @@ -7,6 +7,11 @@ type Encoder struct { io.Writer } +// WriteByte encodes a single byte to the output writer. +func (this *Encoder) WriteByte(value byte) (n int, err error) { + return this.WriteByte(uint8(value)) +} + // WriteInt8 encodes an 8-bit signed integer to the output writer. func (this *Encoder) WriteInt8(value int8) (n int, err error) { return this.WriteUint8(uint8(value))