MCPcopy Create free account
hub / github.com/0xsequence/czip / uintToBytes

Function uintToBytes

compressor/utils.go:129–138  ·  view source on GitHub ↗
(n uint64)

Source from the content-addressed store, hash-verified

127}
128
129func uintToBytes(n uint64) []byte {
130 buf := new(bytes.Buffer)
131 err := binary.Write(buf, binary.BigEndian, n)
132
133 if err != nil {
134 log.Fatalf("binary.Write failed: %v", err)
135 }
136
137 return buf.Bytes()
138}
139
140func padToX(b []byte, n uint) ([]byte, error) {
141 if len(b) > int(n) {

Callers 1

WriteNBytesRawMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected