mirror of
https://github.com/wader/fq.git
synced 2024-12-27 15:42:07 +03:00
14 lines
339 B
Go
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
|
|
}
|