(w io.ByteWriter, typ plumbing.ObjectType, size int64)
| 110 | } |
| 111 | |
| 112 | func writeTestObjectHeader(w io.ByteWriter, typ plumbing.ObjectType, size int64) { |
| 113 | remaining := uint64(size) |
| 114 | first := byte(typ)<<4 | byte(remaining&0x0f) |
| 115 | remaining >>= 4 |
| 116 | if remaining > 0 { |
| 117 | first |= 0x80 |
| 118 | } |
| 119 | _ = w.WriteByte(first) |
| 120 | |
| 121 | for remaining > 0 { |
| 122 | next := byte(remaining & 0x7f) |
| 123 | remaining >>= 7 |
| 124 | if remaining > 0 { |
| 125 | next |= 0x80 |
| 126 | } |
| 127 | _ = w.WriteByte(next) |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | func zlibCompress(t *testing.T, content []byte) []byte { |
| 132 | t.Helper() |
no outgoing calls
no test coverage detected
searching dependent graphs…