View Issue Details

IDProjectCategoryView StatusLast Update
0031444RunnerFunctionsPublic2019-10-18 14:53
ReporterYellowAfterlifeAssigned ToGavin 
PriorityLowSeveritySuggestionReproducibility100%
Status AssignedResolutionOpen 
PlatformWindowsOSWindows 10 ProOS Version>=18362
Product Version 
Target VersionFixed in Version 
Summary0031444: Functions: introduce buffer_crc32(buffer, offset, size)
DescriptionAs 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.


<hr>
Description
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.

Impact coverage
Runtime, HTML5

New functions
buffer_crc32(buffer, offset, size)

DnD
Other buffer hash functions don't have DnD blocks so this one probably doesn't need to either

Documentation
(pretty much the same as existing buffer_sha1/buffer_md5 pages)
Tagsfunctions
1.4 Found In
2.x Runtime Found In
2.x Runtime Verified In

Activities

Fritz

2019-10-18 09:34

Manager   ~0065009

Needs an FSD

YellowAfterlife

2019-10-18 14:53

Developer   ~0065012

Added an FSD to description (possibly not in the current format - is based on some draft I had in my OneNote from last year)