aklomp / base64

Fast Base64 stream encoder/decoder in C99, with SIMD acceleration
BSD 2-Clause "Simplified" License
890 stars 165 forks source link

Add a macro to calculate encoded size from raw size and vice versa #116

Open aklomp opened 2 years ago

aklomp commented 2 years ago

As discussed somewhat in #114, this library should export a macro to simplify calculating the buffer sizes. Two cases are needed:

The macros should take into account the potential presence of stream terminators, and should take care when using truncating integer division.