Search Options

Results per page
Sort
Preferred Languages
Advance

Results 231 - 240 of 1,509 for byteEq (0.06 sec)

  1. cmd/bootstrap-peer-server_gen_test.go

    import (
    	"bytes"
    	"testing"
    
    	"github.com/tinylib/msgp/msgp"
    )
    
    func TestMarshalUnmarshalServerSystemConfig(t *testing.T) {
    	v := ServerSystemConfig{}
    	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)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jan 24 21:36:44 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  2. cmd/bucket-metadata_gen_test.go

    import (
    	"bytes"
    	"testing"
    
    	"github.com/tinylib/msgp/msgp"
    )
    
    func TestMarshalUnmarshalBucketMetadata(t *testing.T) {
    	v := BucketMetadata{}
    	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)
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 23 18:58:53 UTC 2021
    - 2.3K bytes
    - Viewed (0)
  3. internal/s3select/jstream/decoder.go

    func (kvs KVS) MarshalJSON() ([]byte, error) {
    	b := new(bytes.Buffer)
    	b.Write([]byte("{"))
    	for i, kv := range kvs {
    		b.Write([]byte("\"" + kv.Key + "\"" + ":"))
    		valBuf, err := json.Marshal(kv.Value)
    		if err != nil {
    			return nil, err
    		}
    		b.Write(valBuf)
    		if i < len(kvs)-1 {
    			b.Write([]byte(","))
    		}
    	}
    	b.Write([]byte("}"))
    	return b.Bytes(), nil
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/curl/CurlResponse.java

        public String getContentAsString() {
            final byte[] bytes = new byte[4096];
            try (BufferedInputStream bis = new BufferedInputStream(getContentAsStream());
                    ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
                int length = bis.read(bytes);
                while (length != -1) {
                    if (length != 0) {
                        baos.write(bytes, 0, length);
                    }
    Registered: Thu Oct 31 02:32:13 UTC 2024
    - Last Modified: Mon Nov 14 21:05:19 UTC 2022
    - 4K bytes
    - Viewed (0)
  5. cmd/bitrot-streaming.go

    	if err != nil {
    		return 0, err
    	}
    	b.h.Write(buf)
    	if !bytes.Equal(b.h.Sum(nil), b.hashBytes) {
    		return 0, errFileCorrupt
    	}
    	b.currOffset += int64(len(buf))
    	return len(buf), nil
    }
    
    // Returns streaming bitrot reader implementation.
    func newStreamingBitrotReader(disk StorageAPI, data []byte, volume, filePath string, tillOffset int64, algo BitrotAlgorithm, shardSize int64) *streamingBitrotReader {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 21 12:20:54 UTC 2024
    - 6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/primitives/CharsTest.java

        assertThat(Chars.fromByteArray(new byte[] {0x23, 0x45, (byte) 0xDC})).isEqualTo('\u2345');
        assertThat(Chars.fromByteArray(new byte[] {(byte) 0xFE, (byte) 0xDC})).isEqualTo('\uFEDC');
      }
    
      @GwtIncompatible // Chars.fromByteArray
      public void testFromByteArrayFails() {
        assertThrows(
            IllegalArgumentException.class, () -> Chars.fromByteArray(new byte[Chars.BYTES - 1]));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  7. cmd/tier-last-day-stats_gen.go

    func (z *DailyAllTierStats) UnmarshalMsg(bts []byte) (o []byte, err error) {
    	var zb0004 uint32
    	zb0004, bts, err = msgp.ReadMapHeaderBytes(bts)
    	if err != nil {
    		err = msgp.WrapError(err)
    		return
    	}
    	if (*z) == nil {
    		(*z) = make(DailyAllTierStats, zb0004)
    	} else if len((*z)) > 0 {
    		for key := range *z {
    			delete((*z), key)
    		}
    	}
    	var field []byte
    	_ = field
    	for zb0004 > 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Mar 21 17:21:35 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  8. internal/s3select/select_benchmark_test.go

    }
    
    func genSampleCSVData(count int) []byte {
    	buf := &bytes.Buffer{}
    	csvWriter := csv.NewWriter(buf)
    	csvWriter.Write([]string{"id", "name", "age", "city"})
    
    	for i := 0; i < count; i++ {
    		csvWriter.Write([]string{
    			strconv.Itoa(i),
    			newRandString(10),
    			newRandString(5),
    			newRandString(10),
    		})
    	}
    
    	csvWriter.Flush()
    	return buf.Bytes()
    }
    
    type nullResponseWriter struct{}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Apr 14 13:54:47 UTC 2022
    - 5K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerHeader.kt

     * limitations under the License.
     */
    package okhttp3.tls.internal.der
    
    /**
     * The first two bytes of each value is a header that includes its tag (field ID) and length.
     */
    internal data class DerHeader(
      /**
       * Namespace of the tag.
       *
       * This value is encoded in bits 7 and 8 of the first byte of each value.
       *
       * ```
       * 0b00xxxxxx Universal
       * 0b01xxxxxx Application
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  10. cmd/object-api-datatypes_gen.go

    	"github.com/tinylib/msgp/msgp"
    )
    
    // MarshalMsg implements msgp.Marshaler
    func (z BackendType) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	o = msgp.AppendInt(o, int(z))
    	return
    }
    
    // UnmarshalMsg implements msgp.Unmarshaler
    func (z *BackendType) UnmarshalMsg(bts []byte) (o []byte, err error) {
    	{
    		var zb0001 int
    		zb0001, bts, err = msgp.ReadIntBytes(bts)
    		if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:31:51 UTC 2024
    - 70.1K bytes
    - Viewed (0)
Back to top