Using SIMD to Tell if the High Bit is Set

One of the first Zig-related blog posts I wrote was an overview of SIMD with Zig . I recently needed to revisit this topic when enhancing my smtp client library . Specifically, SMTP mostly expects printable ASCII characters. Almost all other characters, including UTF-8 text, must be encoded. I found the various SMTP and MIME RFCs confusing. So I settled on a simple approach: if the high bit of a…