Class SegmentUtils

java.lang.Object
express.mvp.roray.utils.memory.SegmentUtils

public final class SegmentUtils extends Object
A collection of stateless, high-performance utility methods for operating on MemorySegments.
  • Method Details

    • calculateCrc32

      public static int calculateCrc32(MemorySegment segment)
      Calculates the CRC32 checksum for the data within the given memory segment. This method is zero-copy, uses a pooled CRC32 instance per thread, and does not allocate on the heap.
      Parameters:
      segment - The segment of memory to checksum.
      Returns:
      The 32-bit CRC32 checksum value.