This sample encodes and decode with the Base64 format from one file to another
C# |
Copy Code |
XceedBinaryEncodingLib.XceedBinaryEncoding encoder = new XceedBinaryEncodingLib.XceedBinaryEncodingClass();
encoder.License( @"your license key" );
try { encoder.EncodingFormat = new XceedBinaryEncodingLib.XceedBase64EncodingFormatClass();
object bytesRead = null;
// Encode the file encoder.ProcessFile( @"c:\test\file.txt", 0, 0, XceedBinaryEncodingLib.EXBFileProcessing.bfpEncode, true, @"c:\test\encoded.txt", false, ref bytesRead );
// Decode the file encoder.ProcessFile( @"c:\test\encoded.txt", 0, 0, XceedBinaryEncodingLib.EXBFileProcessing.bfpDecode, true, @"c:\test\decoded.txt", false, ref bytesRead ); } catch( System.Runtime.InteropServices.COMException except ) { MessageBox.Show( except.ToString() ); } |