Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for Sum32 (0.01 sec)

  1. internal/ringbuffer/ring_buffer_test.go

    		}
    		t.Fatalf("expect read %d bytes but got %d", wroteBytes, readBytes)
    	}
    	if readHash.Sum32() != wroteHash.Sum32() {
    		t.Fatalf("expect read hash 0x%08x but got 0x%08x", readHash.Sum32(), wroteHash.Sum32())
    	}
    }
    
    func TestRingBuffer_BlockingBig(t *testing.T) {
    	// Typical runtime is ~5-10s.
    	defer timeout(60 * time.Second)()
    	const debug = false
    
    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. src/archive/zip/reader.go

    				} else {
    					err = err1
    				}
    			} else if r.hash.Sum32() != r.f.CRC32 {
    				err = ErrChecksum
    			}
    		} else {
    			// If there's not a data descriptor, we still compare
    			// the CRC32 of what we've read against the file header
    			// or TOC's CRC32, if it seems like it was set.
    			if r.f.CRC32 != 0 && r.hash.Sum32() != r.f.CRC32 {
    				err = ErrChecksum
    			}
    		}
    	}
    	r.err = err
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Sat Aug 03 01:05:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  3. src/archive/zip/writer.go

    	w.closed = true
    	if w.raw {
    		return w.writeDataDescriptor()
    	}
    	if err := w.comp.Close(); err != nil {
    		return err
    	}
    
    	// update FileHeader
    	fh := w.header.FileHeader
    	fh.CRC32 = w.crc32.Sum32()
    	fh.CompressedSize64 = uint64(w.compCount.count)
    	fh.UncompressedSize64 = uint64(w.rawCount.count)
    
    	if fh.isZip64() {
    		fh.CompressedSize = uint32max
    		fh.UncompressedSize = uint32max
    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/zip_test.go

    		}
    	}
    }
    
    // fakeHash32 is a dummy Hash32 that always returns 0.
    type fakeHash32 struct {
    	hash.Hash32
    }
    
    func (fakeHash32) Write(p []byte) (int, error) { return len(p), nil }
    func (fakeHash32) Sum32() uint32               { return 0 }
    
    func TestZip64(t *testing.T) {
    	if testing.Short() {
    		t.Skip("slow test; skipping")
    	}
    	t.Parallel()
    	const size = 1 << 32 // before the "END\n" part
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.6K bytes
    - Viewed (0)
Back to top