IdCoderMIME.pas 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. { $HDR$}
  2. {**********************************************************************}
  3. { Unit archived using Team Coherence }
  4. { Team Coherence is Copyright 2002 by Quality Software Components }
  5. { }
  6. { For further information / comments, visit our WEB site at }
  7. { http://www.TeamCoherence.com }
  8. {**********************************************************************}
  9. {}
  10. { $Log: 10095: IdCoderMIME.pas
  11. {
  12. { Rev 1.0 2002.11.12 10:32:42 PM czhower
  13. }
  14. unit IdCoderMIME;
  15. interface
  16. uses
  17. Classes,
  18. IdCoder3to4;
  19. type
  20. TIdEncoderMIME = class(TIdEncoder3to4)
  21. public
  22. constructor Create(AOwner: TComponent); override;
  23. end;
  24. TIdDecoderMIME = class(TIdDecoder4to3)
  25. public
  26. constructor Create(AOwner: TComponent); override;
  27. end;
  28. const
  29. GBase64CodeTable: string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; {Do not Localize}
  30. var
  31. GBase64DecodeTable: TIdDecodeTable;
  32. implementation
  33. uses
  34. IdGlobal,
  35. SysUtils;
  36. { TIdCoderMIME }
  37. constructor TIdDecoderMIME.Create(AOwner: TComponent);
  38. begin
  39. inherited;
  40. FDecodeTable := GBase64DecodeTable;
  41. FFillChar := '='; {Do not Localize}
  42. end;
  43. { TIdEncoderMIME }
  44. constructor TIdEncoderMIME.Create(AOwner: TComponent);
  45. begin
  46. inherited;
  47. FCodingTable := GBase64CodeTable;
  48. FFillChar := '='; {Do not Localize}
  49. end;
  50. initialization
  51. TIdDecoder4to3.ConstructDecodeTable(GBase64CodeTable, GBase64DecodeTable);
  52. end.