- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for encodedSize (0.21 sec)
-
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go
// it also requires the caller to implement the more efficient Size and MarshalToSizedBuffer methods encodedSize := uint64(t.Size()) estimatedSize := prefixSize + estimateUnknownSize(&unk, encodedSize) data := memAlloc.Allocate(estimatedSize) i, err := unk.NestedMarshalTo(data[prefixSize:], t, encodedSize) if err != nil { return err } copy(data, s.prefix)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 23 13:38:23 UTC 2022 - 17.8K bytes - Viewed (0) -
src/net/http/fcgi/fcgi_test.go
{1000, []byte{0x80, 0x00, 0x03, 0xE8}}, {33554431, []byte{0x81, 0xFF, 0xFF, 0xFF}}, } func TestSize(t *testing.T) { b := make([]byte, 4) for i, test := range sizeTests { n := encodeSize(b, test.size) if !bytes.Equal(b[:n], test.bytes) { t.Errorf("%d expected %x, encoded %x", i, test.bytes, b) } size, n := readSize(test.bytes) if size != test.size {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 11 18:51:39 UTC 2023 - 10.6K bytes - Viewed (0)