- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for PutVarint (1.64 sec)
-
src/encoding/binary/varint.go
// as generated by [PutVarint], to buf and returns the extended buffer. func AppendVarint(buf []byte, x int64) []byte { ux := uint64(x) << 1 if x < 0 { ux = ^ux } return AppendUvarint(buf, ux) } // PutVarint encodes an int64 into buf and returns the number of bytes written. // If the buffer is too small, PutVarint will panic. func PutVarint(buf []byte, x int64) int { ux := uint64(x) << 1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:04:28 UTC 2023 - 4.8K bytes - Viewed (0) -
src/index/suffixarray/suffixarray.go
ix.sa.int64 = make([]int64, len(data)) text_64(data, ix.sa.int64) } return ix } // writeInt writes an int x to w using buf to buffer the write. func writeInt(w io.Writer, buf []byte, x int) error { binary.PutVarint(buf, int64(x)) _, err := w.Write(buf[0:binary.MaxVarintLen64]) return err } // readInt reads an int x from r using buf to buffer the read and returns x. func readInt(r io.Reader, buf []byte) (int64, error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 9.5K bytes - Viewed (0)