PRODUCTS
Mathematica
Mathematica Home Edition
Mathematica for Students
Mathematica for the Classroom
grid
Mathematica
Wolfram Lightweight Grid Manager
web
Mathematica
Mathematica Player
(free download)
Mathematica Player Pro
Wolfram
Workbench
Mathematica
Applications
SOLUTIONS
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics, & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts, & Entertainment
Game Design, Special Effects, & Generative Art
Education
Higher Education
Precollege Education
Students
Technology
Interactive Deployment
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
FOR USERS
All User Resources
Product Registration
Technical Support
Customer Service
Developer Support
Does My Site Have a License?
Free Seminars
Learning Center
Training
Custom Group Seminars
Documentation & Examples
Tutorial Screencasts
Video Gallery
Demonstrations Project
Education Portal
Student Resources
COMPANY
About Wolfram Research
News & Events
Wolfram Blog
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
Wolfram|Alpha
Demonstrations Project
Wolfram Blog
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Library Archive
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
Mathematica
>
Data Manipulation
>
Importing & Exporting
>
Mathematica
Import/Export Format
UnsignedInteger8
Sequence of unsigned 8-bit integers.
Raw binary format.
Equivalent to the Byte format.
Import
can read any file as a sequence of unsigned 8-bit integers.
Export
writes a list of integers in the range
to a binary file.
IMPORT AND EXPORT
Import
["
file
", "UnsignedInteger8"]
imports any file, returning a packed array of integers in the range
.
Export
["
file
",
list
, "UnsignedInteger8"]
exports a list of integers in the range
to
file
.
Import
["
file
", {"UnsignedInteger8",
elem
}]
or
Import
["
file
",
elem
]
imports the specified element from
file
.
Import
["
file
", {"UnsignedInteger8", {
elem
1
,
elem
2
,
...
}}]
imports multiple elements.
See the reference pages for full general information on
Import
and
Export
.
ImportString
and
ExportString
support the UnsignedInteger8 format.
ELEMENTS
General
Import
elements:
"Elements"
elements and options available in this file
"Rules"
full rules for each element and option
"Options"
rules for options, properties, and settings
Data representation element:
"Data"
list of integers in the range
By default,
Import
and
Export
use the
"Data"
element.
Import
["
file
", {"UnsignedInteger8",
n
}]
gives the
n
8-bit integer from
file
.
Trailing bytes are ignored if the size of the imported file is not a multiple of the data size.
OPTIONS
Import
option:
"HeaderBytes"
0
how many bytes to skip at the beginning of the file
SEE ALSO
Binary
Bit
Byte
Character8
Character16
Integer8
Integer16
Integer24
Integer32
Integer64
Integer128
UnsignedInteger16
UnsignedInteger24
UnsignedInteger32
UnsignedInteger64
UnsignedInteger128
Real32
Real64
Real128
Complex64
Complex128
Complex256
String
MORE ABOUT
Binary Data
Listing of All Formats
EXAMPLES
CLOSE ALL
Basic Examples
Convert a list of integers to a string representing binary 8-bit unsigned integers:
In[1]:=
Out[1]=
Convert the binary data back to an expression:
In[2]:=
Out[2]=
Import the same data, assuming it represents an array of 8-bit characters:
In[3]:=
Out[3]=
Skip the first 10 bytes on
Import
:
In[4]:=
Out[4]=