Encoding Base64 from a Stream - Chunk Sizes
I'm currently looking at a use case where I need to take a Stream, and then encode the contents as a Base64 Stream. This is currently achieved with a snippet of code that has previously been placed in multiple classes within this particular environment, and relied on the dotnet gateway (which suffers with a bug in 2022.1, corrected 2022.1.1).
Therefore I will be replacing the dotnet implementation with the standard $System.Encryption.Base64Encode, and then place this all in a nice function to replace each instance of the same (currently non-functional) snippet of code placed in the various classes.
On to the question:
This function will have the option for the base64 to have line returns or not. I know that I will need to chunk the stream in multiples of 3s when encoding the data, and if I want to also include line returns this will need to be every 57 of the stream. Is there any harm in just chunking every 57 regardless of the inclusion of line returns, or is there some form of performance increase/decrease in chunking in values greater than 57?