Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 1,049 for encodeTo (0.11 sec)

  1. src/internal/profile/encode.go

    package profile
    
    import (
    	"errors"
    	"fmt"
    	"sort"
    )
    
    func (p *Profile) decoder() []decoder {
    	return profileDecoder
    }
    
    // preEncode populates the unexported fields to be used by encode
    // (with suffix X) from the corresponding exported fields. The
    // exported fields are cleared up to facilitate testing.
    func (p *Profile) preEncode() {
    	strings := make(map[string]int)
    	addString(strings, "")
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 07 19:52:28 UTC 2023
    - 13.6K bytes
    - Viewed (0)
  2. src/encoding/base64/base64.go

    // which may be changed or disabled via [Encoding.WithPadding].
    func NewEncoding(encoder string) *Encoding {
    	if len(encoder) != 64 {
    		panic("encoding alphabet is not 64-bytes long")
    	}
    
    	e := new(Encoding)
    	e.padChar = StdPadding
    	copy(e.encode[:], encoder)
    	copy(e.decodeMap[:], decodeMapInitialize)
    
    	for i := 0; i < len(encoder); i++ {
    		// Note: While we document that the alphabet cannot contain
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 17.6K bytes
    - Viewed (0)
  3. src/encoding/hex/hex.go

    const bufferSize = 1024
    
    type encoder struct {
    	w   io.Writer
    	err error
    	out [bufferSize]byte // output buffer
    }
    
    // NewEncoder returns an [io.Writer] that writes lowercase hexadecimal characters to w.
    func NewEncoder(w io.Writer) io.Writer {
    	return &encoder{w: w}
    }
    
    func (e *encoder) Write(p []byte) (n int, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 19:30:23 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. platforms/core-configuration/graph-serialization/src/main/kotlin/org/gradle/internal/serialize/graph/package-info.java

     *  <p>A codec implementation will, generally:
     *  <ul>
     *      <li>encode the primitive/non-object values directly by invoking some of the various {@link org.gradle.internal.serialize.Encoder Encoder}'s <code>write*</code> variants</li>
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:30 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  10. 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)
Back to top