1
1
mirror of https://github.com/wader/fq.git synced 2024-12-30 00:52:14 +03:00
fq/format/avro/decoders/int.go
2021-12-29 16:12:36 -06:00

14 lines
345 B
Go

package decoders
import (
"github.com/wader/fq/format/avro/schema"
"github.com/wader/fq/pkg/decode"
)
func decodeIntFn(schema schema.SimplifiedSchema) (func(string, *decode.D), error) {
// int and long values are written using variable-length zig-zag coding.
return func(name string, d *decode.D) {
d.FieldSFn(name, VarZigZag)
}, nil
}