zeam v0.0.3 Zeam
Zeam is a module of ZEAM. ZEAM is ZACKY’s Elixir Abstract Machine, which is aimed at being BEAM compatible. Zeam now provides bytecode analyzing functions.
Link to this section Summary
Functions
This converts a binary into a list
This bundles three values away from each value of a list
This concats a list of integer in the manner of big endian
This concats a list of integer in the manner of little endian
This dumps binary files to stdard output
This dumps binary data to String
This dumps binary files to String
This dumps binary files to String
Hello world
This slices the last 2 chars
This reverses a list
This reads binary (a sequence of bytes) and generates a list of integers that each value is regarded as a 24 bits (3 bytes) in big endian
This reads binary (a sequence of bytes) and generates a list of integers that each value is regarded as a 24 bits (3 bytes) in little endian
Link to this section Functions
This converts a binary into a list.
Parameter
- binary: is a binary to convert into a list.
Examples
iex> Zeam.bin2list(<<0, 1, 2, 3>>) [0, 1, 2, 3]
This bundles three values away from each value of a list.
Parameter
- list: is a list to bundle.
Examples
iex> Zeam.bundle3Values([0, 1, 2, 3]) [[0, 1, 2], [1, 2, 3]]
This concats a list of integer in the manner of big endian.
Parameter
- list: is a list of integer to concat
Examples
iex> Integer.to_string(Zeam.concatBigEndian([0, 1, 2]), 16) “102”
This concats a list of integer in the manner of little endian.
Parameter
- list: is a list of integer to concat
Examples
iex> Integer.to_string(Zeam.concatLittleEndian([0, 1, 2]), 16) “20100”
This dumps binary data to String.
Parameters
- data: is binary data to dump.
Examples
iex> Zeam.dump_d(<<0, 1, 2, 3>>) “00 01 02 03”
This dumps binary files to String.
Parameter
- path: is data or a binary file path to dump.
Examples
iex> Zeam.dump_p(“./test/sample”) “41 42 43 44 45 46 47 48\n49 4A 4B 4C 4D 4E\n\n”
Hello world.
Examples
iex> Zeam.hello
"ZEAM is ZACKY's Elixir Abstract Machine, which is aimed at being BEAM compatible."
This slices the last 2 chars.
Parameters
- string: is string to slice.
Examples
iex> Zeam.last2(“0123”) “23”
This reverses a list.
Parameter
- list: is a list to reverse
Examples
iex> Zeam.reverseList([0, 1, 2]) [2, 1, 0]
This reads binary (a sequence of bytes) and generates a list of integers that each value is regarded as a 24 bits (3 bytes) in big endian.
Parameter
- binary: is a binary to read
Examples
iex> Zeam.toAddressInBigEndian(<<0, 1, 2, 3>>) [258, 66051]