MCPcopy Create free account
hub / github.com/antonmedv/gitmal / fib

Function fib

pkg/gitdiff/binary_test.go:314–324  ·  view source on GitHub ↗
(n int, ord binary.ByteOrder)

Source from the content-addressed store, hash-verified

312}
313
314func fib(n int, ord binary.ByteOrder) []byte {
315 buf := make([]byte, 4*n)
316 for i := 0; i < len(buf); i += 4 {
317 if i < 8 {
318 ord.PutUint32(buf[i:], 1)
319 } else {
320 ord.PutUint32(buf[i:], ord.Uint32(buf[i-4:])+ord.Uint32(buf[i-8:]))
321 }
322 }
323 return buf
324}

Callers 3

TestParseFunction · 0.85
TestParseBinaryChunkFunction · 0.85
TestParseBinaryFragmentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected