Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,011 for Bytes (0.16 sec)

  1. android/guava-tests/test/com/google/common/hash/HashCodeTest.java

        int totalBytes = hashCode.bits() / 8;
    
        for (int bytes = 0; bytes < totalBytes; bytes++) {
          byte[] bb = new byte[bytes];
          hashCode.writeBytesTo(bb, 0, bb.length);
    
          assertTrue(Arrays.equals(Arrays.copyOf(hashBytes, bytes), bb));
        }
      }
    
      private static class ExpectedHashCode {
        final byte[] bytes;
        final int asInt;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  2. guava/src/com/google/common/base/Utf8.java

       * well-formed.
       *
       * <p>This method returns {@code true} if and only if {@code Arrays.equals(bytes, new
       * String(bytes, UTF_8).getBytes(UTF_8))} does, but is more efficient in both time and space.
       */
      public static boolean isWellFormed(byte[] bytes) {
        return isWellFormed(bytes, 0, bytes.length);
      }
    
      /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 10 14:11:51 GMT 2023
    - 7K bytes
    - Viewed (0)
  3. cmd/batch-replicate_gen_test.go

    	v := BatchJobReplicateCredentials{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeBatchJobReplicateCredentials(b *testing.B) {
    	v := BatchJobReplicateCredentials{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Aug 29 18:27:23 GMT 2023
    - 14.2K bytes
    - Viewed (1)
  4. guava-tests/test/com/google/common/io/ByteStreamsTest.java

        byte[] bytes = newPreFilledByteArray(100);
        skipHelper(0, 0, new ByteArrayInputStream(bytes));
        skipHelper(50, 50, new ByteArrayInputStream(bytes));
        skipHelper(50, 50, new SlowSkipper(new ByteArrayInputStream(bytes), 1));
        skipHelper(50, 50, new SlowSkipper(new ByteArrayInputStream(bytes), 0));
        skipHelper(100, -1, new ByteArrayInputStream(bytes));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  5. internal/grid/types.go

    // remainder of bytes.
    func (b *Bytes) UnmarshalMsg(bytes []byte) ([]byte, error) {
    	if b == nil {
    		return bytes, errors.New("Bytes: UnmarshalMsg on nil pointer")
    	}
    	if bytes, err := msgp.ReadNilBytes(bytes); err == nil {
    		if *b != nil {
    			PutByteBuffer(*b)
    		}
    		*b = nil
    		return bytes, nil
    	}
    	val, bytes, err := msgp.ReadBytesZC(bytes)
    	if err != nil {
    		return bytes, err
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 01 23:42:09 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

       *
       *  * 16 bytes: either `OkHttp cache v1\n` if the persisted file is complete. This is another
       *    sequence of bytes if the file is incomplete and should not be used.
       *  * 8 bytes: *n*: upstream data size
       *  * 8 bytes: *m*: metadata size
       *  * *n* bytes: upstream data
       *  * *m* bytes: metadata
       *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  7. cmd/batch-expire_gen_test.go

    import (
    	"bytes"
    	"testing"
    
    	"github.com/tinylib/msgp/msgp"
    )
    
    func TestMarshalUnmarshalBatchJobExpire(t *testing.T) {
    	v := BatchJobExpire{}
    	bts, err := v.MarshalMsg(nil)
    	if err != nil {
    		t.Fatal(err)
    	}
    	left, err := v.UnmarshalMsg(bts)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after UnmarshalMsg(): %q", len(left), left)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 02 10:51:33 GMT 2023
    - 6.9K bytes
    - Viewed (0)
  8. cmd/last-minute_gen_test.go

    import (
    	"bytes"
    	"testing"
    
    	"github.com/tinylib/msgp/msgp"
    )
    
    func TestMarshalUnmarshalAccElem(t *testing.T) {
    	v := AccElem{}
    	bts, err := v.MarshalMsg(nil)
    	if err != nil {
    		t.Fatal(err)
    	}
    	left, err := v.UnmarshalMsg(bts)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after UnmarshalMsg(): %q", len(left), left)
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jul 05 21:45:49 GMT 2022
    - 6.8K bytes
    - Viewed (0)
  9. docs_src/security/tutorial007_an.py

    ):
        current_username_bytes = credentials.username.encode("utf8")
        correct_username_bytes = b"stanleyjobson"
        is_correct_username = secrets.compare_digest(
            current_username_bytes, correct_username_bytes
        )
        current_password_bytes = credentials.password.encode("utf8")
        correct_password_bytes = b"swordfish"
        is_correct_password = secrets.compare_digest(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  10. internal/hash/reader_test.go

    		},
    		{
    			desc:       "Correct sha256, truncated",
    			src:        bytes.NewReader([]byte("abcd-morethan-4-bytes")),
    			size:       4,
    			actualSize: 4,
    			sha256hex:  "88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589",
    			err:        ioutil.ErrOverread,
    		},
    		{
    			desc:       "Correct MD5, nested",
    			src:        mustReader(t, bytes.NewReader([]byte("abcd")), 4, "", "", 4),
    			size:       4,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 10.3K bytes
    - Viewed (0)
Back to top