Skip to content

cyx/streampb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

streampb

streampb is a library heavily inspired from recordio. It frames messages using a varint.

The underlying techniques used are as described in the official docs.

Getting

go get -u github.com/cyx/streampb

Usage

// encoding
enc := streampb.NewEncoder(w)
enc.Encode(ptypes.DurationProto(42 * time.Minute))

// decoding
var d duration.Duration
dec := streampub.NewDecoder(r)
dec.Decode(&d)

Credits

Special thanks to @eclesh for the work on recordio.