Binary data
BINARY
binary(Vector of Integer v
) -> Binary
STABLE
Convert v
to byte array
binary(Charstring hex
) -> Binary
STABLE
Convert hexadecimal string hex
to binary object
binary(Integer i
) -> Binary
STABLE
Convert integer i
to binary object
BITREVERSE
bitreverse(Binary b
) -> Binary
STABLE
Reverse bit order in binary object b
CHARSTRING
charstring(Binary b
) -> Charstring
STABLE
Extract string of bytes from binary object b
DIM
dim(Binary b
) -> Integer
STABLE
The number of bytes in binary object 'b'
dim(Memory m
) -> Integer
STABLE
The number of bytes in byte array m
HEX
hex(Binary b
) -> Charstring
STABLE
Convert binary object b
to hexadecimal string
HEX2INTEGER
hex2integer(Charstring hexnum
) -> Integer
STABLE
Convert hexadecimal number hexnum
to corresponding integer
IN
in(Binary b
) -> Bag of Integer
STABLE
The elements of byte array b
in(Memory m
) -> Bag of Integer
STABLE
The elements of byte array in m
INTEGER
integer(Binary b
) -> Integer
STABLE
Convert binary object b
to integer
INTEGER2HEX
integer2hex(Integer i
) -> Charstring
STABLE
Convert integer i
to the corresponding hexadecimal number
MAKE_BINARY
make_binary(Integer sz
) -> Binary
STABLE
Construct a new binary object with 'sz' bytes
NEW_MEMORY
new_memory(Integer s
) -> Memory
STABLE
Create new Memory object of size s
RAW_FILE
raw_file(Charstring path
) -> Memory
STABLE
No description.
SECTION
section(Binary b
, Integer l
, Integer u
) -> Binary
STABLE
Elements from position l
to u
in binary object b
SETF
setf(Binary b
, Integer i
, Integer v
) -> Boolean
STABLE
Set byte i
in binary object b
to v
setf(Memory m
, Integer i
, Integer v
) -> Boolean
STABLE
Set byte i
in byte array in m
to v
SKIP
skip(Binary b
, Integer n
) -> Binary
STABLE
Skip first n
elements in binary object b
S_BITS
s_bits(Integer u
, Integer o
, Integer l
) -> Integer
STABLE
Get signed bit field of length 'l' at offset 'o' in 'i'
s_bits(Binary b
, Integer o
, Integer l
) -> Integer
STABLE
Get signed bit field of length 'l' at offset 'o' in 'b'
s_bits(Memory m
, Integer o
, Integer l
) -> Integer
STABLE
Get unsigned bit field of length 'l' at offset 'o' in 'm'
UNPACK
unpack(Binary b
, Charstring frm
) -> Vector of Integer
STABLE
Unpack binary object b
based on format frm
.
I32 -> Read the next 32 bits as a signed integer. u16 -> Read the next 16 bits as an unsigned integer. Z08 -> Skip the next 8 bits.
unpack(Charstring hex
, Charstring frm
) -> Vector of Integer
STABLE
Unpack hexadecimal string hex
based on format frm
.
frm
is a string with format specifications [IiUuZz][0-9][0-9]+
.
Examples:
I32 -> Read the next 32 bits as a signed integer.
u16 -> Read the next 16 bits as an unsigned integer.
Z08 -> Skip the next 8 bits.
U_BITS
u_bits(Integer u
, Integer o
, Integer l
) -> Integer
STABLE
Get unsigned bit field of length 'l' at offset 'o' in 'i'
u_bits(Binary b
, Integer o
, Integer l
) -> Integer
STABLE
Get unsigned bit field of length 'l' at offset 'o' in 'b'
u_bits(Memory m
, Integer o
, Integer l
) -> Integer
STABLE
Get unsigned bit field of length 'l' at offset 'o' in 'm'
VREF
vref(Binary b
, Integer i
) -> Integer v
STABLE
Same as b[i]
to get byte i
in binary object b
vref(Memory m
, Integer i
) -> Integer
STABLE
Same as m[i]
vref(Tuple t
, Number i
) -> Object
STABLE
No description.