({{, (RefLink[Encode, paclet:ref/Encode])["source","dest"]
writes an encoded version of the file source to the file dest. }, {, <<dest
decodes the file before reading its contents. }, {, (RefLink[Encode, paclet:ref/Encode])["source","dest","key"]
produces an encoded file that must be read in using (RefLink[Get, paclet:ref/Get])["dest","key"]. }})

OpenersNotesSection(Spacer1)Details and Options

Encoded files contain only printable ASCII characters. They begin with a special sequence that is recognized by (RefLink[Get, paclet:ref/Get]).

On certain computer systems (RefLink[Encode, paclet:ref/Encode])["source","dest",MachineID->"ID"] can be used to generate an encoded file that can be read only on a computer with a particular (RefLink[$MachineID, paclet:ref/$MachineID]).

No function is provided in the Wolfram Language to convert encoded files back to their original form.

(RefLink[File, paclet:ref/File])["name"] may be used to specify a file name.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Set up the name of a file that can be used as temporary storage:

encoded = FileNameJoin[{$TemporaryDirectory,"encoded"}]

(RefLink[Encode, paclet:ref/Encode]) the package file Collatz.m, putting the results in the temporary file:

Encode[FindFile["ExampleData/Collatz.m"],encoded]

The file is visually unreadable:

FilePrint[encoded]

Use (RefLink[Get, paclet:ref/Get]) to decode and load the file:

Get[encoded]

This has loaded the definitions of the Collatz package:

?Collatz

Collatz[30]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[EncryptFile, paclet:ref/EncryptFile])  ▪  (RefLink[ReadProtected, paclet:ref/ReadProtected])  ▪  (RefLink[$MachineID, paclet:ref/$MachineID])  ▪  (RefLink[Get, paclet:ref/Get])  ▪  (RefLink[Compress, paclet:ref/Compress])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Reading and Writing Wolfram System Files, paclet:tutorial/ReadingAndWritingWolframSystemFiles])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Package Development, paclet:guide/PackageDevelopment])}, {▪(RefLinkPlain[Files, paclet:guide/Files])}, {▪(RefLinkPlain[Wolfram Language Expressions in Files, paclet:guide/WolframLanguageExpressionsInFiles])}})}})