OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Read an arbitrary binary file and return it as a raw Wolfram Language string:

s = Import["ExampleData/ocelot.jpg","String"];

Show the first bytes of the result, which contain unprintable characters:

StringTake[s,120]

Convert the string that represents the file "ocelot.jpg" to graphics:

ImportString[s]

OpenersExampleSection1(Spacer1)Scope  (1)

Import binary data and compute an MD5 checksum:

IntegerString[Hash[Import["ExampleData/ocelot.jpg","String"],"MD5"],16,32]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {Related Formats:  (RefLink[Binary, paclet:ref/format/Binary])  ▪  (RefLink[Text, paclet:ref/format/Text])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Basic Formats, paclet:guide/BasicFormats])}, {▪(RefLinkPlain[Importing & Exporting, paclet:guide/ImportingAndExporting])}, {▪(RefLinkPlain[Listing of All Formats, paclet:guide/ListingOfAllFormats])}})}})