I use the following code. F2, F3 - TMemoryStream, but exept catches a StreamReadError exception
EncUtil := TEncUtil.Create; try EncUtil.UseBase64:= True;