Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ByteWriter (0.2 sec)

  1. 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)
  2. 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)
Back to top