$12 GRAYBYTE WORDPRESS FILE MANAGER $94

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/lib/golang/src/runtime/trace/

HOME
Current File : /lib/golang/src/runtime/trace//encoding.go
// Copyright 2025 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package trace

import (
	"errors"
)

// maxVarintLenN is the maximum length of a varint-encoded N-bit integer.
const maxVarintLen64 = 10

var (
	errOverflow = errors.New("binary: varint overflows a 64-bit integer")
	errEOB      = errors.New("binary: end of buffer")
)

// TODO deduplicate this function.
func readUvarint(b []byte) (uint64, int, error) {
	var x uint64
	var s uint
	var byt byte
	for i := 0; i < maxVarintLen64 && i < len(b); i++ {
		byt = b[i]
		if byt < 0x80 {
			if i == maxVarintLen64-1 && byt > 1 {
				return x, i, errOverflow
			}
			return x | uint64(byt)<<s, i + 1, nil
		}
		x |= uint64(byt&0x7f) << s
		s += 7
	}
	return x, len(b), errOverflow
}

// putUvarint encodes a uint64 into buf and returns the number of bytes written.
// If the buffer is too small, PutUvarint will panic.
// TODO deduplicate this function.
func putUvarint(buf []byte, x uint64) int {
	i := 0
	for x >= 0x80 {
		buf[i] = byte(x) | 0x80
		x >>= 7
		i++
	}
	buf[i] = byte(x)
	return i + 1
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
16 Dec 2025 9.34 PM
root / root
0755
annotation.go
6.095 KB
4 Dec 2025 6.06 PM
root / root
0644
batch.go
2.248 KB
4 Dec 2025 6.06 PM
root / root
0644
encoding.go
1.124 KB
4 Dec 2025 6.06 PM
root / root
0644
flightrecorder.go
5.807 KB
4 Dec 2025 6.06 PM
root / root
0644
recorder.go
3.963 KB
4 Dec 2025 6.06 PM
root / root
0644
subscribe.go
4.391 KB
4 Dec 2025 6.06 PM
root / root
0644
trace.go
4.688 KB
4 Dec 2025 6.06 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF