Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for NewIEEE (0.06 sec)

  1. internal/ringbuffer/ring_buffer_test.go

    	defer timeout(60 * time.Second)()
    	const debug = false
    
    	var readBytes int
    	var wroteBytes int
    	var readBuf bytes.Buffer
    	var wroteBuf bytes.Buffer
    	readHash := crc32.NewIEEE()
    	wroteHash := crc32.NewIEEE()
    	read := io.Writer(readHash)
    	wrote := io.Writer(wroteHash)
    	if debug {
    		read = io.MultiWriter(read, &readBuf)
    		wrote = io.MultiWriter(wrote, &wroteBuf)
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  2. internal/hash/checksum.go

    }
    
    // Hasher returns a hasher corresponding to the checksum type.
    // Returns nil if no checksum.
    func (c ChecksumType) Hasher() hash.Hash {
    	switch {
    	case c.Is(ChecksumCRC32):
    		return crc32.NewIEEE()
    	case c.Is(ChecksumCRC32C):
    		return crc32.New(crc32.MakeTable(crc32.Castagnoli))
    	case c.Is(ChecksumSHA1):
    		return sha1.New()
    	case c.Is(ChecksumSHA256):
    		return sha256.New()
    	}
    	return nil
    }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 19 12:59:07 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  3. src/archive/zip/writer.go

    		ow = dirWriter{}
    	} else {
    		fh.Flags |= 0x8 // we will write a data descriptor
    
    		fw = &fileWriter{
    			zipw:      w.cw,
    			compCount: &countWriter{w: w.cw},
    			crc32:     crc32.NewIEEE(),
    		}
    		comp := w.compressor(fh.Method)
    		if comp == nil {
    			return nil, ErrAlgorithm
    		}
    		var err error
    		fw.comp, err = comp(fw.compCount)
    		if err != nil {
    			return nil, err
    		}
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Sep 23 14:32:33 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  4. src/archive/zip/reader.go

    	var desr io.Reader
    	if f.hasDataDescriptor() {
    		desr = io.NewSectionReader(f.zipr, f.headerOffset+bodyOffset+size, dataDescriptorLen)
    	}
    	rc = &checksumReader{
    		rc:   rc,
    		hash: crc32.NewIEEE(),
    		f:    f,
    		desr: desr,
    	}
    	return rc, nil
    }
    
    // OpenRaw returns a [Reader] that provides access to the [File]'s contents without
    // decompression.
    func (f *File) OpenRaw() (io.Reader, error) {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Sat Aug 03 01:05:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  5. src/archive/tar/reader_test.go

    					if err == io.EOF {
    						err = nil // Expected error
    					}
    					break
    				}
    				hdrs = append(hdrs, hdr)
    
    				if v.chksums == nil {
    					continue
    				}
    				h := crc32.NewIEEE()
    				_, err = io.CopyBuffer(h, tr, rdbuf) // Effectively an incremental read
    				if err != nil {
    					break
    				}
    				chksums = append(chksums, fmt.Sprintf("%x", h.Sum(nil)))
    			}
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Oct 03 15:48:09 UTC 2024
    - 46.9K bytes
    - Viewed (0)
Back to top