Class SegmentUtils
java.lang.Object
express.mvp.roray.utils.memory.SegmentUtils
A collection of stateless, high-performance utility methods for operating on
MemorySegments.-
Method Summary
Modifier and TypeMethodDescriptionstatic intcalculateCrc32(MemorySegment segment) Calculates the CRC32 checksum for the data within the given memory segment.
-
Method Details
-
calculateCrc32
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.
-