Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for Crc32cHashFunction (0.19 sec)

  1. android/guava/src/com/google/common/hash/Crc32cHashFunction.java

     * polynomial for this checksum is {@code 0x11EDC6F41}.
     *
     * @author Kurt Alfred Kluever
     */
    @Immutable
    @ElementTypesAreNonnullByDefault
    final class Crc32cHashFunction extends AbstractHashFunction {
      static final HashFunction CRC_32_C = new Crc32cHashFunction();
    
      @Override
      public int bits() {
        return 32;
      }
    
      @Override
      public Hasher newHasher() {
        return new Crc32cHasher();
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 21.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/Crc32cHashFunctionTest.java

          assertCrc(referenceCrc(bytes), bytes);
        }
      }
    
      private static int referenceCrc(byte[] bytes) {
        int crc = ~0;
        for (byte b : bytes) {
          crc = (crc >>> 8) ^ Crc32cHashFunction.Crc32cHasher.BYTE_TABLE[(crc ^ b) & 0xFF];
        }
        return ~crc;
      }
    
      /**
       * Verifies that the crc of an array of byte data matches the expected value.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Dec 23 18:30:33 GMT 2020
    - 6.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/hash/Crc32cHashFunctionTest.java

          assertCrc(referenceCrc(bytes), bytes);
        }
      }
    
      private static int referenceCrc(byte[] bytes) {
        int crc = ~0;
        for (byte b : bytes) {
          crc = (crc >>> 8) ^ Crc32cHashFunction.Crc32cHasher.BYTE_TABLE[(crc ^ b) & 0xFF];
        }
        return ~crc;
      }
    
      /**
       * Verifies that the crc of an array of byte data matches the expected value.
       *
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Dec 23 18:30:33 GMT 2020
    - 6.5K bytes
    - Viewed (0)
  4. guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java

          checksum.update(testBytes, 0, testBytes.length);
          result = (byte) (result ^ checksum.getValue());
        }
        return result;
      }
    
      // CRC32C
    
      @Benchmark
      byte crc32cHashFunction(int reps) {
        return runHashFunction(reps, Hashing.crc32c());
      }
    
      // Adler32
    
      @Benchmark
      byte adler32HashFunction(int reps) {
        return runHashFunction(reps, Hashing.adler32());
      }
    
    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)
  5. android/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java

          checksum.update(testBytes, 0, testBytes.length);
          result = (byte) (result ^ checksum.getValue());
        }
        return result;
      }
    
      // CRC32C
    
      @Benchmark
      byte crc32cHashFunction(int reps) {
        return runHashFunction(reps, Hashing.crc32c());
      }
    
      // Adler32
    
      @Benchmark
      byte adler32HashFunction(int reps) {
        return runHashFunction(reps, Hashing.adler32());
      }
    
    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)
  6. android/guava/src/com/google/common/hash/Hashing.java

       * href="https://en.wikipedia.org/wiki/Hash_function">hash function</a>.
       *
       * @since 18.0
       */
      public static HashFunction crc32c() {
        return Crc32cHashFunction.CRC_32_C;
      }
    
      /**
       * Returns a hash function implementing the CRC-32 checksum algorithm (32 hash bits).
       *
       * <p>To get the {@code long} value equivalent to {@link Checksum#getValue()} for a {@code
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 09 00:37:15 GMT 2024
    - 29.2K bytes
    - Viewed (0)
Back to top