- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,335 for decode (0.11 sec)
-
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/decode.go
// For parity with JSON, strings can be decoded into time.Time if they are RFC 3339 // timestamps. ByteStringToTime: cbor.ByteStringToTimeAllowed, }.DecMode() if err != nil { panic(err) } return decode }() // DecodeLax is derived from Decode, but does not complain about unknown fields in the input. var DecodeLax cbor.DecMode = func() cbor.DecMode { opts := Decode.DecOptions()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jun 10 14:03:36 UTC 2024 - 3.9K bytes - Viewed (0) -
src/encoding/gob/decode.go
func (dec *Decoder) ignoreSlice(state *decoderState, elemOp decOp) { dec.ignoreArrayHelper(state, elemOp, int(state.decodeUint())) } // decodeInterface decodes an interface value and stores it in value. // Interfaces are encoded as the name of a concrete type followed by a value. // If the name is empty, the value is nil and no value is sent.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 07 19:10:23 UTC 2023 - 40.1K bytes - Viewed (0) -
src/encoding/json/decode.go
d.scanWhile(scanSkipSpace) if d.opcode == scanEndArray { break } v = append(v, d.valueInterface()) // Next token must be , or ]. if d.opcode == scanSkipSpace { d.scanWhile(scanSkipSpace) } if d.opcode == scanEndArray { break } if d.opcode != scanArrayValue { panic(phasePanicMsg) } } return v }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:18:55 UTC 2024 - 35.3K bytes - Viewed (0) -
cmd/erasure-decode.go
} // If we cannot decode, just return read quorum error. return nil, fmt.Errorf("%w (offline-disks=%d/%d)", errErasureReadQuorum, disksNotFound, len(p.readers)) } // Decode reads from readers, reconstructs data if needed and writes the data to the writer. // A set of preferred drives can be supplied. In that case they will be used and the data reconstructed.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 21 14:36:21 UTC 2024 - 9.4K bytes - Viewed (0) -
platforms/core-runtime/serialization/src/test/groovy/org/gradle/internal/serialize/AbstractCodecTest.groovy
expect: def bytesA = encode { Encoder encoder -> encoder.writeSmallInt(a as int) } def bytesB = encode { Encoder encoder -> encoder.writeSmallInt(b as int) } decode(bytesA) { Decoder decoder -> assert decoder.readSmallInt() == a } decode(bytesB) { Decoder decoder ->
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Apr 15 16:06:56 UTC 2024 - 14.9K bytes - Viewed (0) -
src/encoding/ascii85/ascii85.go
return } // NewDecoder constructs a new ascii85 stream decoder. func NewDecoder(r io.Reader) io.Reader { return &decoder{r: r} } type decoder struct { err error readErr error r io.Reader buf [1024]byte // leftover input nbuf int out []byte // leftover decoded output outbuf [1024]byte } func (d *decoder) Read(p []byte) (n int, err error) { if len(p) == 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:04:28 UTC 2023 - 6.9K bytes - Viewed (0) -
src/encoding/gob/encoder_test.go
B int } var b bytes.Buffer NewEncoder(&b).Encode(Test{"one", 1}) var result, result2 Test dec := NewDecoder(&b) err := dec.Decode(&result) if err != nil { t.Errorf("decode: unexpected error %v", err) } b.Reset() NewEncoder(&b).Encode(Test{"two", 2}) err = dec.Decode(&result2) if err == nil { t.Errorf("decode: expected duplicate type error, got nil")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 29.7K bytes - Viewed (0) -
src/encoding/hex/hex.go
func DecodedLen(x int) int { return x / 2 } // Decode decodes src into [DecodedLen](len(src)) bytes, // returning the actual number of bytes written to dst. // // Decode expects that src contains only hexadecimal // characters and that src has even length. // If the input is malformed, Decode returns the number // of bytes decoded before the error. func Decode(dst, src []byte) (int, error) { i, j := 0, 1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 19:30:23 UTC 2024 - 9.5K bytes - Viewed (0) -
pkg/kubelet/kubeletconfig/util/codec/codec.go
obj, gvk, err := kubeletCodecs.UniversalDecoder().Decode(data, nil, nil) if err != nil { // Try strict decoding first. If that fails decode with a lenient // decoder, which has only v1beta1 registered, and log a warning. // The lenient path is to be dropped when support for v1beta1 is dropped. if !runtime.IsStrictDecodingError(err) { return nil, fmt.Errorf("failed to decode: %w", err) } var lenientErr error
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 03 21:48:29 UTC 2023 - 4.2K bytes - Viewed (0) -
platforms/core-runtime/serialization/src/test/groovy/org/gradle/internal/serialize/kryo/KryoBackedCodecTest.groovy
decode(bytes) { Decoder decoder -> decoder.decodeChunked {} assert decoder.readString() == "done" } } def "can encode and skip empty byte stream"() { when: def bytes = encode { Encoder encoder -> encoder.encodeChunked {} encoder.writeString("done") } then: decode(bytes) { Decoder decoder ->
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Apr 15 16:06:56 UTC 2024 - 5.2K bytes - Viewed (0)