Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 135 for Bytes (0.14 sec)

  1. 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)
  2. 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)
  3. cmd/bucket-replication-utils_gen_test.go

    	v := BucketReplicationResyncStatus{}
    	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 BenchmarkDecodeBucketReplicationResyncStatus(b *testing.B) {
    	v := BucketReplicationResyncStatus{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Aug 22 23:53:06 GMT 2022
    - 23K bytes
    - Viewed (0)
  4. cmd/batch-rotate_gen_test.go

    import (
    	"bytes"
    	"testing"
    
    	"github.com/tinylib/msgp/msgp"
    )
    
    func TestMarshalUnmarshalBatchJobKeyRotateEncryption(t *testing.T) {
    	v := BatchJobKeyRotateEncryption{}
    	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 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Aug 29 18:27:23 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  5. 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)
  6. cmd/object_api_suite_test.go

    	if err != nil {
    		t.Fatalf("%s: <ERROR> %s", instanceType, err)
    	}
    	if len(bytesBuffer1.Bytes()) != len(content) {
    		t.Errorf("%s: Expected content length to be `%d`, but instead found `%d`", instanceType, len(content), len(bytesBuffer1.Bytes()))
    	}
    
    	var bytesBuffer2 bytes.Buffer
    	_, err = obj.PutObject(context.Background(), "bucket", "object", mustGetPutObjReader(t, readerNoEOF, length, "", ""), opts)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 32.3K bytes
    - Viewed (0)
  7. internal/s3select/message.go

    	buf := new(bytes.Buffer)
    	binary.Write(buf, binary.BigEndian, uint32(totalLength))
    	binary.Write(buf, binary.BigEndian, uint32(headerLength))
    	prelude := buf.Bytes()
    	binary.Write(buf, binary.BigEndian, crc32.ChecksumIEEE(prelude))
    	buf.Write(header)
    	if payload != nil {
    		buf.Write(payload)
    	}
    	message := buf.Bytes()
    	binary.Write(buf, binary.BigEndian, crc32.ChecksumIEEE(message))
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Aug 30 15:26:43 GMT 2022
    - 15.2K bytes
    - Viewed (0)
  8. docs/debugging/xl-meta/main.go

    			}
    			b, _, minor, err := checkXL2V1(b)
    			if err != nil {
    				return nil, err
    			}
    			filemap[file] = make(map[string]string)
    			buf := bytes.NewBuffer(nil)
    			v0 := ""
    			var data xlMetaInlineData
    			switch minor {
    			case 0:
    				_, err = msgp.CopyToJSON(buf, bytes.NewReader(b))
    				if err != nil {
    					return nil, err
    				}
    			case 1, 2:
    				v, b, err := msgp.ReadBytesZC(b)
    				if err != nil {
    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)
  9. cmd/site-replication-metrics_gen.go

    		switch msgp.UnsafeString(field) {
    		case "Count":
    			z.Count, err = dc.ReadInt64()
    			if err != nil {
    				err = msgp.WrapError(err, "Count")
    				return
    			}
    		case "Bytes":
    			z.Bytes, err = dc.ReadInt64()
    			if err != nil {
    				err = msgp.WrapError(err, "Bytes")
    				return
    			}
    		default:
    			err = dc.Skip()
    			if err != nil {
    				err = msgp.WrapError(err)
    				return
    			}
    		}
    	}
    	return
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Feb 06 06:00:45 GMT 2024
    - 40.6K bytes
    - Viewed (0)
  10. internal/s3select/sql/value.go

    // InferBytesType will attempt to infer the data type of bytes.
    // Will fail if value type is not bytes or it would result in invalid utf8.
    // ORDER: int, float, bool, JSON (object or array), timestamp, string
    // If the content is valid JSON, the type will still be bytes.
    func (v *Value) InferBytesType() (err error) {
    	b, ok := v.ToBytes()
    	if !ok {
    		return fmt.Errorf("InferByteType: Input is not bytes, but %v", v.GetTypeString())
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 20.2K bytes
    - Viewed (0)
Back to top