View Single Post
  #6  
Old Yesterday, 23:30
Lord.Freddy's Avatar
Lord.Freddy Lord.Freddy is offline
Registered User
 
Join Date: Apr 2022
Location: ...
Posts: 57
Thanks: 237
Thanked 51 Times in 27 Posts
Lord.Freddy is on a distinguished road
Quote:
Originally Posted by Lord.Freddy View Post
Changelog:
Code:
▪︎ Core rewrite — the C++/setjmp-coroutine wrapper was replaced with a portable C89 state-machine design: smaller, allocation-free on the hot path, and far easier to audit and maintain.
▪︎ Reliable DLL handling — MpzSlimmer.dll is loaded by absolute path from the executable's own directory, with PE bounds/signature validation of the patch site and hardened search-path handling (no DLL-hijack surface).
▪︎ Crash-safe codec execution — codec faults and unexpected failures are trapped and reported as clean errors instead of hanging or dying silently.
▪︎ Robust Win32 I/O — rewritten buffering, seeking and partial read/write handling, with uniform support for regular files and stdin/stdout pipes.
▪︎ Large-file (2 GB) protection — streams exceeding the codec's signed 32-bit limit are detected and rejected before any output is written.
▪︎ Configurable I/O buffer — buffer size is now selectable on the command line (clamped to a safe range) to trade throughput against memory use.
▪︎ Progress reporting — file-to-file operations display live progress; suppressed automatically for pipes.
▪︎ Improved CLI — explicit c / d modes, "-" for stdin/stdout, optional buffer size, and -h / --help.
▪︎ Security & build hardening — ASLR/DEP enforced, no RWX/self-modifying memory, and an embedded version resource + application manifest; together these cut antivirus false positives.
▪︎ Dual-toolchain build — compiles warning-clean under both MSVC (cl) and MinGW GCC/Clang from a single Makefile.
▪︎ General robustness — EOF, empty input, same-file in/out, and failure cleanup (incomplete output is removed) are now handled explicitly rather than relying on old coroutine side effects.
In short: v2 is a substantial rewrite focused on reliability, safe error handling, better I/O, and a cleaner, more portable codebase.
Compiled with: clang-14.2.0-mingw-w64msvcrt-12.0.0

Full credit to Eugene Shelwein for the original MPZ wrapper
Source code + final compiled executable file added.

Last edited by Lord.Freddy; Yesterday at 23:33.
Reply With Quote