1
1
mirror of https://github.com/wader/fq.git synced 2024-12-27 15:42:07 +03:00
fq/format/avro/decoders/int.go
2022-01-19 23:53:33 -06:00

14 lines
339 B
Go

package decoders
import (
"github.com/wader/fq/pkg/decode"
"github.com/wader/fq/pkg/scalar"
)
func decodeIntFn(sms ...scalar.Mapper) (DecodeFn, error) {
// Int and long values are written using variable-length zig-zag coding.
return func(name string, d *decode.D) interface{} {
return d.FieldSFn(name, VarZigZag, sms...)
}, nil
}