org.apache.ignite.internal.processors.cache.persistence.wal.crc

## Class FastCrc

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.persistence.wal.crc.FastCrc

    public final class FastCrc
    extends Object

This CRC calculation implementation workf much faster then `PureJavaCrc32`

### Constructor Summary

Constructors
Constructor and Description
`FastCrc()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static int` `calcCrc(ByteBuffer buf, int len)`
`static int` `calcCrc(File file)`
`int` `getValue()`
`void` `reset()` Preparation for further calculations.
`void` `update(ByteBuffer buf, int len)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### FastCrc

    public FastCrc()

### Method Detail

#### reset

    public void reset()

Preparation for further calculations.

#### getValue

    public int getValue()

Returns:
  crc value.

#### update

    public void update(ByteBuffer buf,
                       int len)

Parameters:
  `buf` - Input buffer.
  `len` - Data length.

#### calcCrc

    public static int calcCrc(ByteBuffer buf,
                              int len)

Parameters:
  `buf` - Input buffer.
  `len` - Data length.
Returns:
  Crc checksum.

#### calcCrc

    public static int calcCrc(File file)
                       throws IOException

Parameters:
  `file` - A file to calculate checksum over it.
Returns:
  CRC32 checksum.
Throws:
  `IOException` - If fails.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021