Examples of XXHash32


Examples of net.jpountz.xxhash.XXHash32

  private static void blockExample() throws UnsupportedEncodingException {
    XXHashFactory factory = XXHashFactory.fastestInstance();

    byte[] data = "12345345234572".getBytes("UTF-8");

    XXHash32 hash32 = factory.hash32();
    int seed = 0x9747b28c; // used to initialize the hash value, use whatever
                           // value you want, but always the same
    int hash = hash32.hash(data, 0, data.length, seed);
    System.out.println("Block hash: " + hash);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.