MCPcopy
hub / github.com/golang/geo / Decode

Method Decode

s2/rect.go:448–452  ·  view source on GitHub ↗

Decode decodes a rectangle.

(rd io.Reader)

Source from the content-addressed store, hash-verified

446
447// Decode decodes a rectangle.
448func (r *Rect) Decode(rd io.Reader) error {
449 d := &decoder{r: asByteReader(rd)}
450 r.decode(d)
451 return d.err
452}
453
454func (r *Rect) decode(d *decoder) {
455 if version := d.readUint8(); int8(version) != encodingVersion && d.err == nil {

Callers 1

BenchmarkRectDecodeFunction · 0.95

Calls 2

decodeMethod · 0.95
asByteReaderFunction · 0.85

Tested by 1

BenchmarkRectDecodeFunction · 0.76