All Projects → jtendo → Binpp

jtendo / Binpp

Licence: other
🔢 Erlang Binary Pretty Printer

Programming Languages

elixir
2628 projects
erlang
1774 projects

Projects that are alternatives of or similar to Binpp

Corrode
A batteries-included library for reading binary data.
Stars: ✭ 116 (-21.62%)
Mutual labels:  binary
Pwninit
pwninit - automate starting binary exploit challenges
Stars: ✭ 127 (-14.19%)
Mutual labels:  binary
Binch
A light ELF binary patch tool in python urwid
Stars: ✭ 139 (-6.08%)
Mutual labels:  binary
Formatfuzzer
FormatFuzzer is a framework for high-efficiency, high-quality generation and parsing of binary inputs.
Stars: ✭ 117 (-20.95%)
Mutual labels:  binary
Vcf2phylip
Convert SNPs in VCF format to PHYLIP, NEXUS, binary NEXUS, or FASTA alignments for phylogenetic analysis
Stars: ✭ 126 (-14.86%)
Mutual labels:  binary
Libmali
The Mali GPU library used in Rockchip Platform
Stars: ✭ 128 (-13.51%)
Mutual labels:  binary
Safe
SAFE: Self-Attentive Function Embeddings for binary similarity
Stars: ✭ 112 (-24.32%)
Mutual labels:  binary
Exodus
Painless relocation of Linux binaries–and all of their dependencies–without containers.
Stars: ✭ 2,560 (+1629.73%)
Mutual labels:  binary
Opennpd
C++ detect and train of "A Fast and Accurate Unconstrained Face Detector".
Stars: ✭ 126 (-14.86%)
Mutual labels:  binary
Phpasn1
A PHP library to encode and decode arbitrary ASN.1 structures using ITU-T X.690 encoding rules.
Stars: ✭ 136 (-8.11%)
Mutual labels:  binary
Swiftprettyprint
Pretty print for Swift.
Stars: ✭ 118 (-20.27%)
Mutual labels:  pretty-print
Snodge
Randomly mutate JSON, XML, HTML forms, text and binary data for fuzz testing
Stars: ✭ 121 (-18.24%)
Mutual labels:  binary
Borer
Efficient CBOR and JSON (de)serialization in Scala
Stars: ✭ 131 (-11.49%)
Mutual labels:  binary
Bssom.net
A small, high performance, powerful serializer using bssom binary protocol
Stars: ✭ 117 (-20.95%)
Mutual labels:  binary
Ololog
A better console.log for the log-driven debugging junkies
Stars: ✭ 141 (-4.73%)
Mutual labels:  pretty-print
Epk2extract
Extraction tool for LG, Hisense, Sharp, Philips/TPV, Thompson and similar TVs/Embedded Devices
Stars: ✭ 115 (-22.3%)
Mutual labels:  binary
Ast Pretty Print
A pretty printer for AST-like structures
Stars: ✭ 129 (-12.84%)
Mutual labels:  pretty-print
Tiny Binary Format
Memory efficient binary formats instead of objects.
Stars: ✭ 143 (-3.38%)
Mutual labels:  binary
Binarykeyboard
A keyboard with two buttons that types in binary.
Stars: ✭ 141 (-4.73%)
Mutual labels:  binary
Heksa
CLI hex dumper with colors
Stars: ✭ 133 (-10.14%)
Mutual labels:  binary

binpp - Erlang Binary Pretty Printer

Hex.pm: https://hex.pm/packages/binpp

Build Status

Example usage:

1> Bin.
<<12,242,207,49,82,69,45,130,212,69,80,88,8,81,23,36,86,7,
  68,19,133,97,51,216,56,145,88,8,81,...>>
2> binpp:pprint(Bin).
0000 0C F2 CF 31 52 45 2D 82 D4 45 50 58 08 51 17 24  .òÏ1RE-‚ÔEPX.Q.$
0001 56 07 44 13 85 61 33 D8 38 91 58 08 51 17 24 56  V.D.…a3Ø8‘X.Q.$V
0002 0A 14 20 4E 24 16 09 60 F4 0A 15 11 01 30 13 89  .. N$..`ô....0.‰
0003 05 81 0F 09 15 C5 61 33 D8 54 91 52 5D 81 17 24  ....Åa3ØT‘R].$
0004 11 14 60 23 D1 3D 55 80                          ..`#Ñ=U€
ok

Binpp will use io:format to output the formatted binary by default, however there are options making pprint functions return formatted data instead of performing direct IO write:

1> Bin2 = <<"foo bar baz">>.
<<"foo bar baz">>
2> binpp:pprint(Bin2, [{return, iolist}]).
[["0000",32,"66 6F 6F 20 62 61 72 20 62 61 7A                ",32,
  "foo bar baz","\n"]]
3> binpp:pprint(Bin2, [{return, binary}]).
<<"0000 66 6F 6F 20 62 61 72 20 62 61 7A                 foo bar baz\n">>

You may use a custom printer function as well:

4> binpp:pprint(Bin2, [{printer, fun(O) -> io:format("~s~n", [O]) end}]).
0000 66 6F 6F 20 62 61 72 20 62 61 7A                 foo bar baz

ok

An additional API is provided for printing binary fragments:

5> binpp:pprint(Bin2, {0, 3}, []).
0000 66 6F 6F                                         foo

Also, binary byte-to-byte comparsion:

6> binpp:compare(<<1,2,1024:512,3,4>>, <<1,3,1024:512,5,6>>).
-- 02 -- -- -- -- -- -- -- -- -- -- -- -- -- --   -- 03 -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- 03 04                                       -- -- 05 06
ok

Plus a handy little helper:

7> binpp:compare(<<1,2,255,3,1024:512>>, binpp:from_str("01 02 FF CC")).
-- -- -- 03 00 00 00 00 00 00 00 00 00 00 00 00   -- -- -- CC ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
00 00 04 00                                       ?? ?? ?? ??
ok

Edoc available at http://jtendo.github.com/binpp/doc/.

That's all folks!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].