codec: Add missing WriteByte function

This commit is contained in:
Sasha Koshka 2025-05-30 07:08:43 -04:00
parent 83fa77ba13
commit 58514f6afe

View File

@ -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))