Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 1,011 for Bytes (0.17 sec)

  1. cmd/tier_gen_test.go

    import (
    	"bytes"
    	"testing"
    
    	"github.com/tinylib/msgp/msgp"
    )
    
    func TestMarshalUnmarshalTierConfigMgr(t *testing.T) {
    	v := TierConfigMgr{}
    	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: Fri Apr 23 18:58:53 GMT 2021
    - 2.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/hash/AbstractHasher.java

      }
    
      @Override
      @CanIgnoreReturnValue
      public Hasher putBytes(byte[] bytes) {
        return putBytes(bytes, 0, bytes.length);
      }
    
      @Override
      @CanIgnoreReturnValue
      public Hasher putBytes(byte[] bytes, int off, int len) {
        Preconditions.checkPositionIndexes(off, off + len, bytes.length);
        for (int i = 0; i < len; i++) {
          putByte(bytes[off + i]);
        }
        return this;
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 3.5K bytes
    - Viewed (0)
  3. istioctl/pkg/writer/compare/comparator_test.go

    package compare
    
    import (
    	"bytes"
    	"os"
    	"testing"
    )
    
    // TestComparatorMatchingConfigs tests the scenario where Istiod and Envoy configurations match
    func TestComparatorMatchingSameConfigs(t *testing.T) {
    	cfg, err := os.ReadFile("testdata/configdump.json")
    	if err != nil {
    		t.Fatalf("Failed to read test data: %v", err)
    	}
    
    	var outputBuffer bytes.Buffer
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Mar 12 10:02:09 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  4. cmd/erasure-object_test.go

    	}
    	gr.Close()
    	if !bytes.Equal(output.Bytes(), smallData) {
    		t.Fatalf("Corrupted data is found")
    	}
    
    	// Test: Upload a file bigger than the small file threshold
    	// under the same bucket & key name and try to read it again.
    
    	output.Reset()
    	bigData := bytes.Repeat([]byte{'b'}, smallFileThreshold*numberOfDisks/2)
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 36.8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

        hasher.assertBytes(new byte[] {1, 2});
      }
    
      public void testString() {
        Random random = new Random();
        for (int i = 0; i < 100; i++) {
          byte[] bytes = new byte[64];
          random.nextBytes(bytes);
          String s = new String(bytes, UTF_16LE); // so all random strings are valid
          assertEquals(
              new TestHasher().putUnencodedChars(s).hash(),
              new TestHasher().putBytes(s.getBytes(UTF_16LE)).hash());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  6. internal/http/request-recorder.go

    package http
    
    import (
    	"bytes"
    	"io"
    )
    
    // RequestRecorder - records the
    // of a given io.Reader
    type RequestRecorder struct {
    	// Data source to record
    	io.Reader
    	// Response body should be logged
    	LogBody bool
    
    	// internal recording buffer
    	buf bytes.Buffer
    	// total bytes read including header size
    	bytesRead int
    }
    
    // Close is a no operation closer
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 12 21:37:19 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  7. src/bytes/example_test.go

    func ExampleBuffer_Grow() {
    	var b bytes.Buffer
    	b.Grow(64)
    	bb := b.Bytes()
    	b.Write([]byte("64 bytes or fewer"))
    	fmt.Printf("%q", bb[:b.Len()])
    	// Output: "64 bytes or fewer"
    }
    
    func ExampleBuffer_Len() {
    	var b bytes.Buffer
    	b.Grow(64)
    	b.Write([]byte("abcde"))
    	fmt.Printf("%d", b.Len())
    	// Output: 5
    }
    
    func ExampleBuffer_Next() {
    	var b bytes.Buffer
    	b.Grow(64)
    	b.Write([]byte("abcde"))
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  8. android/guava/src/com/google/common/io/ByteStreams.java

          }
          remaining -= read;
        }
    
        // bytes is now full
        int b = in.read();
        if (b == -1) {
          return bytes;
        }
    
        // the stream was longer, so read the rest normally
        Queue<byte[]> bufs = new ArrayDeque<>(TO_BYTE_ARRAY_DEQUE_SIZE + 2);
        bufs.add(bytes);
        bufs.add(new byte[] {(byte) b});
        return toByteArrayInternal(in, bufs, bytes.length + 1);
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  9. cmd/bucket-stats_gen_test.go

    import (
    	"bytes"
    	"testing"
    
    	"github.com/tinylib/msgp/msgp"
    )
    
    func TestMarshalUnmarshalBucketReplicationStat(t *testing.T) {
    	v := BucketReplicationStat{}
    	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: Wed Aug 30 08:00:59 GMT 2023
    - 20.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

        assertTrue(source.wasStreamClosed());
        assertArrayEquals(bytes, out.toByteArray());
      }
    
      public void testSize() throws IOException {
        assertEquals(bytes.length, source.size());
        assertTrue(source.wasStreamOpened() && source.wasStreamClosed());
    
        // test that we can get the size even if skip() isn't supported
        assertEquals(bytes.length, new TestByteSource(bytes, SKIP_THROWS).size());
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
Back to top