Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 966 for uvarint (0.24 sec)

  1. src/cmd/compile/internal/typecheck/iexport.go

    //         }
    //     }
    //
    //     Fingerprint [8]byte
    //
    // uvarint means a uint64 written out using uvarint encoding.
    //
    // []T means a uvarint followed by that many T objects. In other
    // words:
    //
    //     Len   uvarint
    //     Elems [Len]T
    //
    // stringOff means a uvarint that indicates an offset within the
    // Strings section. At that offset is another uvarint, followed by
    // that many bytes, which form the string value.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 21 02:40:02 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  2. src/runtime/debuglog.go

    	size := uint64(r.readUint16LEAt(r.begin))
    	end = r.begin + size
    	r.begin += debugLogHeaderSize
    
    	// Read tick, nano, and p.
    	tick = r.uvarint() + r.tick
    	nano = r.uvarint() + r.nano
    	p = int(r.varint())
    
    	return
    }
    
    func (r *debugLogReader) uvarint() uint64 {
    	var u uint64
    	for i := uint(0); ; i += 7 {
    		b := r.data.b[r.begin%uint64(len(r.data.b))]
    		r.begin++
    		u |= uint64(b&^0x80) << i
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:10:48 UTC 2024
    - 18.3K bytes
    - Viewed (0)
  3. src/encoding/binary/varint.go

    }
    
    // AppendVarint appends the varint-encoded form of x,
    // 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.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  4. src/internal/trace/batchcursor.go

    	}
    	n := 1
    
    	// Read timestamp diff.
    	ts, nb := binary.Uvarint(b[n:])
    	if nb <= 0 {
    		return 0, 0, fmt.Errorf("found invalid uvarint for timestamp")
    	}
    	n += nb
    
    	// Read the rest of the arguments.
    	for i := 0; i < len(spec.Args)-1; i++ {
    		arg, nb := binary.Uvarint(b[n:])
    		if nb <= 0 {
    			return 0, 0, fmt.Errorf("found invalid uvarint")
    		}
    		e.args[i] = arg
    		n += nb
    	}
    	return n, timestamp(ts), nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. internal/hash/checksum.go

    	for len(b) > 0 {
    		t, n := binary.Uvarint(b)
    		if n < 0 {
    			break
    		}
    		b = b[n:]
    
    		typ := ChecksumType(t)
    		length := typ.RawByteLen()
    		if length == 0 || len(b) < length {
    			break
    		}
    		cs := base64.StdEncoding.EncodeToString(b[:length])
    		b = b[length:]
    		if typ.Is(ChecksumMultipart) {
    			t, n := binary.Uvarint(b)
    			if n < 0 {
    				break
    			}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 08 16:18:34 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/decodesym.go

    	if r == 0 {
    		return ""
    	}
    
    	data := ldr.DataString(r)
    	n := 1 + binary.MaxVarintLen64
    	if len(data) < n {
    		n = len(data)
    	}
    	nameLen, nameLenLen := binary.Uvarint([]byte(data[1:n]))
    	return data[1+nameLenLen : 1+nameLenLen+int(nameLen)]
    }
    
    func decodetypeNameEmbedded(ldr *loader.Loader, symIdx loader.Sym, relocs *loader.Relocs, off int) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 16:25:18 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  7. src/index/suffixarray/suffixarray.go

    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) {
    	_, err := io.ReadFull(r, buf[0:binary.MaxVarintLen64]) // ok to continue with error
    	x, _ := binary.Varint(buf)
    	return x, err
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  8. src/debug/buildinfo/buildinfo.go

    		switch m {
    		case plan9obj.Magic386, plan9obj.MagicAMD64, plan9obj.MagicARM:
    			return true
    		}
    	}
    	return false
    }
    
    func decodeString(data []byte) (s string, rest []byte) {
    	u, n := binary.Uvarint(data)
    	if n <= 0 || u > uint64(len(data)-n) {
    		return "", nil
    	}
    	return string(data[n : uint64(n)+u]), data[uint64(n)+u:]
    }
    
    // readString returns the string at address addr in the executable x.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  9. src/cmd/link/internal/loadelf/ldelf.go

    		return ""
    	}
    	s := string(a.data[:nul])
    	a.data = a.data[nul+1:]
    	return s
    }
    
    func (a *elfAttributeList) uleb128() uint64 {
    	if a.err != nil {
    		return 0
    	}
    	v, size := binary.Uvarint(a.data)
    	a.data = a.data[size:]
    	return v
    }
    
    // Read an elfAttribute from the list following the rules used on ARM systems.
    func (a *elfAttributeList) armAttr() elfAttribute {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 15:12:12 UTC 2024
    - 33.9K bytes
    - Viewed (0)
  10. src/go/internal/gcimporter/iimport.go

    	r.obj(name)
    }
    
    func (p *iimporter) stringAt(off uint64) string {
    	if s, ok := p.stringCache[off]; ok {
    		return s
    	}
    
    	slen, n := binary.Uvarint(p.stringData[off:])
    	if n <= 0 {
    		errorf("varint failed")
    	}
    	spos := off + uint64(n)
    	s := string(p.stringData[spos : spos+slen])
    	p.stringCache[off] = s
    	return s
    }
    
    func (p *iimporter) pkgAt(off uint64) *types.Package {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.2K bytes
    - Viewed (0)
Back to top