Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 329 for uvarint (0.15 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. src/internal/trace/internal/oldtrace/parser.go

    var errMalformedVarint = errors.New("malformatted base-128 varint")
    
    // readVal reads unsigned base-128 value from r.
    func (p *parser) readVal() (uint64, error) {
    	v, n := binary.Uvarint(p.data[p.off:])
    	if n <= 0 {
    		return 0, errMalformedVarint
    	}
    	p.off += n
    	return v, nil
    }
    
    func readValFrom(buf []byte) (v uint64, rem []byte, err error) {
    	v, n := binary.Uvarint(buf)
    	if n <= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:15:28 UTC 2024
    - 46.8K bytes
    - Viewed (0)
  7. src/cmd/go/internal/modindex/read.go

    func (d *decoder) stringTableAt(off int) string {
    	if off < 0 || off >= len(d.str) {
    		panic(errCorrupt)
    	}
    	s := d.str[off:]
    	v, n := binary.Uvarint(s)
    	if n <= 0 || v > uint64(len(s[n:])) {
    		panic(errCorrupt)
    	}
    	return asString(s[n : n+int(v)])
    }
    
    // A reader reads sequential fields from a section of the index format.
    type reader struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  8. src/runtime/tracebuf.go

    	// Write the buffer's header.
    	if exp == traceNoExperiment {
    		w.byte(byte(traceEvEventBatch))
    	} else {
    		w.byte(byte(traceEvExperimentalBatch))
    		w.byte(byte(exp))
    	}
    	w.varint(uint64(w.gen))
    	w.varint(uint64(mID))
    	w.varint(uint64(ts))
    	w.traceBuf.lenPos = w.varintReserve()
    	return w
    }
    
    // traceBufQueue is a FIFO of traceBufs.
    type traceBufQueue struct {
    	head, tail *traceBuf
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:47:01 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  9. src/internal/trace/event/event.go

    	// HasData is true if the event has trailer consisting of a
    	// varint length followed by unencoded bytes of some data.
    	//
    	// An event may not be both a timed event and have data.
    	HasData bool
    
    	// IsStack indicates that the event represents a complete
    	// stack trace. Specifically, it means that after the arguments
    	// there's a varint length, followed by 4*length varints. Each
    	// group of 4 represents the PC, file ID, func ID, and line number
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssagen/ssa.go

    	}
    
    	x := base.Ctxt.Lookup(s.curfn.LSym.Name + ".opendefer")
    	x.Set(obj.AttrContentAddressable, true)
    	s.curfn.LSym.Func().OpenCodedDeferInfo = x
    
    	off := 0
    	off = objw.Uvarint(x, off, uint64(-s.deferBitsTemp.FrameOffset()))
    	off = objw.Uvarint(x, off, uint64(-firstOffset))
    }
    
    // buildssa builds an SSA function for fn.
    // worker indicates which of the backend workers is doing the processing.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 284.9K bytes
    - Viewed (0)
Back to top