- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 1,508 for encodeTo (0.14 sec)
-
src/encoding/gob/example_interface_test.go
// 15 } // interfaceEncode encodes the interface value into the encoder. func interfaceEncode(enc *gob.Encoder, p Pythagoras) { // The encode will fail unless the concrete type has been // registered. We registered it in the calling function. // Pass pointer to interface so Encode sees (and hence sends) a value of // interface type. If we passed p directly it would see the concrete type instead.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 02 00:13:47 UTC 2016 - 2.1K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go
return d.reader.Close() } type encoder struct { writer io.Writer encoder runtime.Encoder buf *bytes.Buffer } // NewEncoder returns a new streaming encoder. func NewEncoder(w io.Writer, e runtime.Encoder) Encoder { return &encoder{ writer: w, encoder: e, buf: &bytes.Buffer{}, } } // Encode writes the provided object to the nested writer.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Aug 25 14:51:36 UTC 2023 - 3.7K bytes - Viewed (0) -
src/internal/coverage/encodecounter/encode.go
} func (cfw *CoverageDataWriter) writeCounters(visitor CounterVisitor, ws *slicewriter.WriteSeeker) error { // Notes: // - this version writes everything little-endian, which means // a call is needed to encode every value (expensive) // - we may want to move to a model in which we just blast out // all counters, or possibly mmap the file and do the write // implicitly. ctrb := make([]byte, 4)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 7.8K bytes - Viewed (0) -
src/encoding/base64/base64_test.go
for _, tt := range encodingTests { encoded := tt.conv(p.encoded) dbuf := make([]byte, tt.enc.DecodedLen(len(encoded))) count, err := tt.enc.Decode(dbuf, []byte(encoded)) testEqual(t, "Decode(%q) = error %v, want %v", encoded, err, error(nil)) testEqual(t, "Decode(%q) = length %v, want %v", encoded, count, len(p.decoded)) testEqual(t, "Decode(%q) = %q, want %q", encoded, string(dbuf[0:count]), p.decoded)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Sep 03 18:57:29 UTC 2023 - 15.9K bytes - Viewed (0) -
src/encoding/base32/base32_test.go
dbuf := make([]byte, StdEncoding.DecodedLen(len(p.encoded))) count, end, err := StdEncoding.decode(dbuf, []byte(p.encoded)) testEqual(t, "Decode(%q) = error %v, want %v", p.encoded, err, error(nil)) testEqual(t, "Decode(%q) = length %v, want %v", p.encoded, count, len(p.decoded)) if len(p.encoded) > 0 { testEqual(t, "Decode(%q) = end %v, want %v", p.encoded, end, (p.encoded[len(p.encoded)-1] == '=')) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 16:25:54 UTC 2024 - 26K bytes - Viewed (0) -
src/encoding/base32/example_test.go
// "Hello, world!" } func ExampleNewEncoder() { input := []byte("foo\x00bar") encoder := base32.NewEncoder(base32.StdEncoding, os.Stdout) encoder.Write(input) // Must close the encoder when finished to flush any partial blocks. // If you comment out the following line, the last partial block "r" // won't be encoded. encoder.Close() // Output: // MZXW6ADCMFZA====
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 27 16:54:36 UTC 2021 - 1.6K bytes - Viewed (0) -
src/mime/quotedprintable/writer.go
cr bool } // NewWriter returns a new [Writer] that writes to w. func NewWriter(w io.Writer) *Writer { return &Writer{w: w} } // Write encodes p using quoted-printable encoding and writes it to the // underlying [io.Writer]. It limits line length to 76 characters. The encoded // bytes are not necessarily flushed until the [Writer] is closed. func (w *Writer) Write(p []byte) (n int, err error) { for i, b := range p { switch {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 16:12:35 UTC 2024 - 3.2K bytes - Viewed (0) -
platforms/core-configuration/graph-serialization/src/main/kotlin/org/gradle/internal/serialize/graph/package-info.java
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Sat Jun 08 11:29:30 UTC 2024 - 4.7K bytes - Viewed (0) -
src/image/gif/writer.go
type writer interface { Flush() error io.Writer io.ByteWriter } // encoder encodes an image to the GIF format. type encoder struct { // w is the writer to write to. err is the first error encountered during // writing. All attempted writes after the first error become no-ops. w writer err error // g is a reference to the data that is being encoded. g GIF // globalCT is the size in bytes of the global color table.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:38:09 UTC 2024 - 11.9K bytes - Viewed (0) -
src/main/java/jcifs/smb1/util/Base64.java
/** * Base-64 encodes the supplied block of data. Line wrapping is not * applied on output. * * @param bytes The block of data that is to be Base-64 encoded. * @return A <code>String</code> containing the encoded data. */ public static String encode(byte[] bytes) { int length = bytes.length; if (length == 0) return "";
Registered: Wed Jun 12 15:45:55 UTC 2024 - Last Modified: Fri Mar 22 20:39:42 UTC 2019 - 3.7K bytes - Viewed (0)