Encode

Encode["source","dest"]

writes an encoded version of the file source to the file dest.

<<dest

decodes the file before reading its contents.

Encode["source","dest","key"]

produces an encoded file that must be read in using Get["dest","key"].

Details and Options

  • Encoded files contain only printable ASCII characters. They begin with a special sequence that is recognized by Get.
  • On certain computer systems Encode["source","dest",MachineID->"ID"] can be used to generate an encoded file that can be read only on a computer with a particular $MachineID.
  • No function is provided in the Wolfram Language to convert encoded files back to their original form.
  • File["name"] may be used to specify a file name.

Examples

Basic Examples  (1)

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

Encode the package file Collatz.m, putting the results in the temporary file:

The file is visually unreadable:

Use Get to decode and load the file:

This has loaded the definitions of the Collatz package:

Wolfram Research (1991), Encode, Wolfram Language function, https://reference.wolfram.com/language/ref/Encode.html (updated 2016).

Text

Wolfram Research (1991), Encode, Wolfram Language function, https://reference.wolfram.com/language/ref/Encode.html (updated 2016).

CMS

Wolfram Language. 1991. "Encode." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/Encode.html.

APA

Wolfram Language. (1991). Encode. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Encode.html

BibTeX

@misc{reference.wolfram_2024_encode, author="Wolfram Research", title="{Encode}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/Encode.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_encode, organization={Wolfram Research}, title={Encode}, year={2016}, url={https://reference.wolfram.com/language/ref/Encode.html}, note=[Accessed: 21-November-2024 ]}