Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for CRC32 (0.15 sec)

  1. src/archive/zip/writer.go

    		fh.UncompressedSize64 = 0
    
    		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
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 04 14:28:57 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java

        new Random(RANDOM_SEED).nextBytes(testBytes);
      }
    
      // CRC32
    
      @Benchmark
      byte crc32HashFunction(int reps) {
        return runHashFunction(reps, Hashing.crc32());
      }
    
      @Benchmark
      byte crc32Checksum(int reps) throws Exception {
        byte result = 0x01;
        for (int i = 0; i < reps; i++) {
          CRC32 checksum = new CRC32();
          checksum.update(testBytes, 0, testBytes.length);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jun 13 16:19:15 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java

        new Random(RANDOM_SEED).nextBytes(testBytes);
      }
    
      // CRC32
    
      @Benchmark
      byte crc32HashFunction(int reps) {
        return runHashFunction(reps, Hashing.crc32());
      }
    
      @Benchmark
      byte crc32Checksum(int reps) throws Exception {
        byte result = 0x01;
        for (int i = 0; i < reps; i++) {
          CRC32 checksum = new CRC32();
          checksum.update(testBytes, 0, testBytes.length);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 13 16:19:15 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  4. lib/time/mkzip.go

    		w, err := zw.CreateRaw(&zip.FileHeader{
    			Name:               name,
    			Method:             zip.Store,
    			CompressedSize64:   uint64(len(data)),
    			UncompressedSize64: uint64(len(data)),
    			CRC32:              crc32.ChecksumIEEE(data),
    		})
    		if err != nil {
    			log.Fatal(err)
    		}
    		if _, err := w.Write(data); err != nil {
    			log.Fatal(err)
    		}
    		seen[name] = true
    		return nil
    	})
    	if err != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 17:32:07 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  5. internal/hash/checksum.go

    // 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
    }
    
    // Trailing return whether the checksum is trailing.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  6. src/archive/zip/writer_test.go

    		}
    		if got.Flags != want.flags {
    			t.Errorf("%s: got Flags %#x; want %#x", want.name, got.Flags, want.flags)
    		}
    		if got.CRC32 != want.crc32 {
    			t.Errorf("%s: got CRC32 %#x; want %#x", want.name, got.CRC32, want.crc32)
    		}
    		if got.CompressedSize64 != want.compressedSize {
    			t.Errorf("%s: got CompressedSize64 %d; want %d", want.name, got.CompressedSize64, want.compressedSize)
    		}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 15 19:04:06 GMT 2023
    - 14.1K bytes
    - Viewed (0)
  7. docs/debugging/inspect/decrypt-v1.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package main
    
    import (
    	"encoding/binary"
    	"encoding/hex"
    	"fmt"
    	"hash/crc32"
    	"io"
    
    	"github.com/secure-io/sio-go"
    )
    
    func extractInspectV1(keyHex string, r io.Reader, w io.Writer, okMsg string) error {
    	id, err := hex.DecodeString(keyHex[:8])
    	if err != nil {
    		return err
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 11 21:22:47 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  8. src/archive/zip/struct.go

    	// Deprecated: Use Modified instead.
    	ModifiedTime uint16
    
    	// ModifiedDate is an MS-DOS-encoded date.
    	//
    	// Deprecated: Use Modified instead.
    	ModifiedDate uint16
    
    	// CRC32 is the CRC32 checksum of the file content.
    	CRC32 uint32
    
    	// CompressedSize is the compressed size of the file in bytes.
    	// If either the uncompressed or compressed size of the file
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 12.1K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/hash/HashingTest.java

        HashTestUtils.assertInvariants(Hashing.sha512());
        assertEquals("Hashing.sha512()", Hashing.sha512().toString());
      }
    
      public void testCrc32() {
        HashTestUtils.assertInvariants(Hashing.crc32());
        assertEquals("Hashing.crc32()", Hashing.crc32().toString());
      }
    
      public void testAdler32() {
        HashTestUtils.assertInvariants(Hashing.adler32());
        assertEquals("Hashing.adler32()", Hashing.adler32().toString());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  10. 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
    	return
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 27.7K bytes
    - Viewed (0)
Back to top