API Reference
HexIO API
HexIO.unpack
— Functionunpack(io::IO, T::Type, endianness::Symbol = :NativeEndian)
Given an input io
, unpack type T
, byte-swapping according to the given endianness
of io
. If endianness
is :NativeEndian
(the default), no byteswapping will occur. If endianness
is :LittleEndian
or :BigEndian
, byteswapping will occur of the endianness if the host system does not match the endianness of io
.
HexIO.pack
— Functionpack(io::IO, source, endianness::Symbol = :NativeEndian)
Given an input source
, pack it into io
, byte-swapping according to the given endianness
of io
. If endianness
is :NativeEndian
(the default), no byteswapping will occur. If endianness
is :LittleEndian
or :BigEndian
, byteswapping will occur if the endianness of the host system does not match the endianness of io
.
HexIO.fix_endian
— Functionfix_endian(x, endianness::Symbol)
Returns a byte-swapped version of x
if the given endianness must be swapped for the current host system.
Missing docstring for HexIO.packed_sizeof
. Check Documenter's build log for details.
HexIO.@io
— Macro@io <type definition>
...
end
Generates packing_strategy()
and packed_sizeof()
methods for the type being defined within the given type definition. This enables usage of the unpack
method.
HexIO.Hex
— TypeHex(filename::AbstractString, _offset::Int=0)
Hex(io::IO, _offset::Int=0)
HexIO.dump!
— Functiondump!(s::Hex, start=nothing, n=nothing)
display data chunk of n size beginning at offset
HexIO.edit!
— Functionedit!(s::Hex, datastr::AbstractString, start=nothing)
edit binary file.
HexIO.find!
— Functionfind!(s::Hex, sigstr::AbstractString, start=nothing)
search for binary signature and return the offset or nothing; modify s._offset to point to beginning of located signature