https://gitlab.synchro.net/main/sbbs/-/commit/22051ffa13a5ec5706e57283
Modified Files:
src/hash/crc32.c
Log Message:
Buffer file CRC-32 calculation
Read files in 64 KiB blocks and pass each block to crc32_update()
instead of calling fgetc() and ucrc32() for every byte. ZMODEM
receivers can request a whole-file CRC before an upload starts, making
the old loop especially costly for large files.
Six interleaved cached 1 GiB scans improved average throughput from
94.3 MiB/s to 706.0 MiB/s, reducing scan time from 10.861 seconds to
1.451 seconds, a 7.49-fold speedup.
Preserve the existing zero-length and bounded-length behavior. Verify
CRC results and file positions across EOF and 64 KiB boundaries, and
run the SyncTERM test suite.
Refs #1195
Co-authored-by: OpenAI Codex <
noreply@openai.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net