Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for ByteWriter (0.48 sec)

  1. src/cmd/link/internal/wasm/asm.go

    	}
    	writeSecSize(ctxt, sizeOffset2)
    
    	writeSecSize(ctxt, sizeOffset)
    }
    
    type nameWriter interface {
    	io.ByteWriter
    	io.Writer
    }
    
    func writeI32Const(w io.ByteWriter, v int32) {
    	w.WriteByte(0x41) // i32.const
    	writeSleb128(w, int64(v))
    }
    
    func writeI64Const(w io.ByteWriter, v int64) {
    	w.WriteByte(0x42) // i64.const
    	writeSleb128(w, v)
    }
    
    func writeName(w nameWriter, name string) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:48 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  2. src/compress/lzw/writer.go

    // license that can be found in the LICENSE file.
    
    package lzw
    
    import (
    	"bufio"
    	"errors"
    	"fmt"
    	"io"
    )
    
    // A writer is a buffered, flushable writer.
    type writer interface {
    	io.ByteWriter
    	Flush() error
    }
    
    const (
    	// A code is a 12 bit value, stored as a uint32 when encoding to avoid
    	// type conversions when shifting bits.
    	maxCode     = 1<<12 - 1
    	invalidCode = 1<<32 - 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:40 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  3. src/hash/maphash/maphash.go

    	if h.seed.s == 0 {
    		seed := MakeSeed()
    		h.seed = seed
    		h.state = seed
    	}
    }
    
    // WriteByte adds b to the sequence of bytes hashed by h.
    // It never fails; the error result is for implementing [io.ByteWriter].
    func (h *Hash) WriteByte(b byte) error {
    	if h.n == len(h.buf) {
    		h.flush()
    	}
    	h.buf[h.n] = b
    	h.n++
    	return nil
    }
    
    // Write adds b to the sequence of bytes hashed by h.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 19:15:34 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  4. src/io/io.go

    // seek to one byte before the current offset.
    type ByteScanner interface {
    	ByteReader
    	UnreadByte() error
    }
    
    // ByteWriter is the interface that wraps the WriteByte method.
    type ByteWriter interface {
    	WriteByte(c byte) error
    }
    
    // RuneReader is the interface that wraps the ReadRune method.
    //
    // ReadRune reads a single encoded Unicode character
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:34:10 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  5. src/image/gif/writer.go

    func log2(x int) int {
    	for i, v := range log2Lookup {
    		if x <= v {
    			return i
    		}
    	}
    	return -1
    }
    
    // writer is a buffered writer.
    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.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:38:09 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  6. src/image/jpeg/writer.go

    func init() {
    	for i, s := range theHuffmanSpec {
    		theHuffmanLUT[i].init(s)
    	}
    }
    
    // writer is a buffered writer.
    type writer interface {
    	Flush() error
    	io.Writer
    	io.ByteWriter
    }
    
    // encoder encodes an image to the JPEG format.
    type encoder struct {
    	// w is the writer to write to. err is the first error encountered during
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 17.1K bytes
    - Viewed (0)
  7. src/encoding/xml/marshal.go

    	if p.closed && p.err == nil {
    		p.err = errors.New("use of closed Encoder")
    	}
    	if p.err == nil {
    		n, p.err = p.w.WriteString(s)
    	}
    	return n, p.err
    }
    
    // WriteByte implements io.ByteWriter
    func (p *printer) WriteByte(c byte) error {
    	if p.closed && p.err == nil {
    		p.err = errors.New("use of closed Encoder")
    	}
    	if p.err == nil {
    		p.err = p.w.WriteByte(c)
    	}
    	return p.err
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  8. internal/ringbuffer/ring_buffer_test.go

    	"sync"
    	"testing"
    	"time"
    )
    
    func TestRingBuffer_interface(t *testing.T) {
    	rb := New(1)
    	var _ io.Writer = rb
    	var _ io.Reader = rb
    	// var _ io.StringWriter = rb
    	var _ io.ByteReader = rb
    	var _ io.ByteWriter = rb
    }
    
    func TestRingBuffer_Write(t *testing.T) {
    	rb := New(64)
    
    	// check empty or full
    	if !rb.IsEmpty() {
    		t.Fatalf("expect IsEmpty is true but got false")
    	}
    	if rb.IsFull() {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  9. src/net/http/request.go

    	// Don't always call NewWriter, as that forces a bytes.Buffer
    	// and other small bufio Writers to have a minimum 4k buffer
    	// size.
    	var bw *bufio.Writer
    	if _, ok := w.(io.ByteWriter); !ok {
    		bw = bufio.NewWriter(w)
    		w = bw
    	}
    
    	_, err = fmt.Fprintf(w, "%s %s HTTP/1.1\r\n", valueOrDefault(r.Method, "GET"), ruri)
    	if err != nil {
    		return err
    	}
    
    	// Header lines
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*SectionReader).ReadAt", Method, 0},
    		{"(*SectionReader).Seek", Method, 0},
    		{"(*SectionReader).Size", Method, 0},
    		{"ByteReader", Type, 0},
    		{"ByteScanner", Type, 0},
    		{"ByteWriter", Type, 1},
    		{"Closer", Type, 0},
    		{"Copy", Func, 0},
    		{"CopyBuffer", Func, 5},
    		{"CopyN", Func, 0},
    		{"Discard", Var, 16},
    		{"EOF", Var, 0},
    		{"ErrClosedPipe", Var, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top