Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 248 for mbuf (0.19 sec)

  1. src/archive/zip/writer.go

    		// if modification time is the only timestamp being encoded.
    		var mbuf [9]byte // 2*SizeOf(uint16) + SizeOf(uint8) + SizeOf(uint32)
    		mt := uint32(fh.Modified.Unix())
    		eb := writeBuf(mbuf[:])
    		eb.uint16(extTimeExtraID)
    		eb.uint16(5)  // Size: SizeOf(uint8) + SizeOf(uint32)
    		eb.uint8(1)   // Flags: ModTime
    		eb.uint32(mt) // ModTime
    		fh.Extra = append(fh.Extra, mbuf[:]...)
    	}
    
    	var (
    		ow io.Writer
    		fw *fileWriter
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 04 14:28:57 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  2. internal/config/identity/openid/jwks.go

    			return nil, errMalformedJWKRSAKey
    		}
    
    		// decode exponent
    		ebuf, err := base64.RawURLEncoding.DecodeString(key.E)
    		if err != nil {
    			return nil, errMalformedJWKRSAKey
    		}
    
    		nbuf, err := base64.RawURLEncoding.DecodeString(key.N)
    		if err != nil {
    			return nil, errMalformedJWKRSAKey
    		}
    
    		var n, e big.Int
    		n.SetBytes(nbuf)
    		e.SetBytes(ebuf)
    
    		return &rsa.PublicKey{
    			E: int(e.Int64()),
    			N: &n,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 02 23:02:35 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  3. cmd/os_unix.go

    	defer syscall.Close(fd)
    
    	bufp := direntPool.Get().(*[]byte)
    	defer direntPool.Put(bufp)
    	buf := *bufp
    
    	boff := 0 // starting read position in buf
    	nbuf := 0 // end valid data in buf
    
    	for {
    		if boff >= nbuf {
    			boff = 0
    			stop := globalOSMetrics.time(osMetricReadDirent)
    			nbuf, err = syscall.ReadDirent(fd, buf)
    			stop()
    			if err != nil {
    				if isSysErrNotDir(err) {
    					return nil
    				}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  4. docs/debugging/xl-meta/main.go

    	if err != nil {
    		return x, buf, err
    	}
    	x.metaVer, buf, err = msgp.ReadUintBytes(buf)
    	if err != nil {
    		return x, buf, err
    	}
    	if x.headerVer > xlHeaderVersion {
    		return x, buf, fmt.Errorf("decodeXLHeaders: Unknown xl header version %d", x.headerVer)
    	}
    	if x.metaVer > xlMetaVersion {
    		return x, buf, fmt.Errorf("decodeXLHeaders: Unknown xl meta version %d", x.metaVer)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
  5. src/bytes/bytes_test.go

    		buf := bmbuf[0:n]
    		buf[n-1] = 'x'
    		for i := 0; i < b.N; i++ {
    			j := Index(buf, buf[n-7:])
    			if j != n-7 {
    				b.Fatal("bad index", j)
    			}
    		}
    		buf[n-1] = '\x00'
    	})
    }
    
    func BenchmarkIndexEasy(b *testing.B) {
    	benchBytes(b, indexSizes, func(b *testing.B, n int) {
    		buf := bmbuf[0:n]
    		buf[n-1] = 'x'
    		buf[n-7] = 'x'
    		for i := 0; i < b.N; i++ {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  6. src/archive/tar/reader.go

    	buf, err := readSpecialFile(r)
    	if err != nil {
    		return nil, err
    	}
    	sbuf := string(buf)
    
    	// For GNU PAX sparse format 0.0 support.
    	// This function transforms the sparse format 0.0 headers into format 0.1
    	// headers since 0.0 headers were not PAX compliant.
    	var sparseMap []string
    
    	paxHdrs := make(map[string]string)
    	for len(sbuf) > 0 {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/CharStreamsTest.java

        assertEquals(-1, empty.read());
      }
    
      public void testExhaust_readable() throws IOException {
        CharBuffer buf = CharBuffer.wrap(ASCII);
        assertEquals(ASCII.length(), CharStreams.exhaust(buf));
        assertEquals(0, buf.remaining());
        assertEquals(0, CharStreams.exhaust(buf));
    
        CharBuffer empty = CharBuffer.wrap("");
        assertEquals(0, CharStreams.exhaust(empty));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/CharStreamsTest.java

        assertEquals(-1, empty.read());
      }
    
      public void testExhaust_readable() throws IOException {
        CharBuffer buf = CharBuffer.wrap(ASCII);
        assertEquals(ASCII.length(), CharStreams.exhaust(buf));
        assertEquals(0, buf.remaining());
        assertEquals(0, CharStreams.exhaust(buf));
    
        CharBuffer empty = CharBuffer.wrap("");
        assertEquals(0, CharStreams.exhaust(empty));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  9. cmd/xl-storage-format-v2.go

    	}
    }
    
    func decodeXLHeaders(buf []byte) (versions int, headerV, metaV uint8, b []byte, err error) {
    	hdrVer, buf, err := msgp.ReadUint8Bytes(buf)
    	if err != nil {
    		return 0, 0, 0, buf, err
    	}
    	metaVer, buf, err := msgp.ReadUint8Bytes(buf)
    	if err != nil {
    		return 0, 0, 0, buf, err
    	}
    	if hdrVer > xlHeaderVersion {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 05:07:37 GMT 2024
    - 63.6K bytes
    - Viewed (1)
  10. cmd/xl-storage.go

    	stat, err := f.Stat()
    	if err != nil {
    		buf, err = io.ReadAll(f)
    		return buf, dmTime, osErrToFileErr(err)
    	}
    	if stat.IsDir() {
    		return nil, dmTime, errFileNotFound
    	}
    
    	// Read into appropriate buffer.
    	sz := stat.Size()
    	if sz <= metaDataReadDefault {
    		buf = metaDataPoolGet()
    		buf = buf[:sz]
    	} else {
    		buf = make([]byte, sz)
    	}
    
    	// Read file...
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 84.7K bytes
    - Viewed (0)
Back to top