View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0031444||Runner||Functions||Public||2019-10-17 17:59||2021-08-04 11:34|
|Status||Resolved||Resolution||No Change Required|
|Platform||Windows||OS||Windows 10 Pro||OS Version||>=18362|
|Target Version||Fixed in Version|
|Summary||0031444: Functions: introduce buffer_crc32(buffer, offset, size)|
|Description||As CRC32 is very commonly used in file formats and protocols, it would seem like a reasonable thing to introduce a built-in function for it, as re-implementing the algorithm in GML loses the speed advantage that it's usually chosen for to begin with.|
The function would work much like the existing buffer_sha1(buffer, offset, size) and buffer_md5(buffer, offset, size);
The runtimes already contain a CRC32 implementation.
Introduce a buffer_crc32(buffer, offset, size) function to compute a CRC32 hash of a buffer section.
Why do we want this feature
CRC32 is very commonly used in file formats and protocols; re-implementing the algorithm in GML loses the speed advantage that it's usually chosen for; common optimization methods (multi-byte operations with pre-computed tables) are not very effective at mitigating the overhead.
buffer_crc32(buffer, offset, size)
Other buffer hash functions don't have DnD blocks so this one probably doesn't need to either
(pretty much the same as existing buffer_sha1/buffer_md5 pages)
|1.4 Found In|
|2.x Runtime Found In|
|2.x Runtime Verified In|
||Needs an FSD|
|Added an FSD to description (possibly not in the current format - is based on some draft I had in my OneNote from last year)|
||Either fixed a long time ago or no longer valid in 2.3.3. Mass-closing.|