{"id":15056410,"url":"https://github.com/jtendo/binpp","last_synced_at":"2025-04-05T20:09:39.243Z","repository":{"id":1668923,"uuid":"2395711","full_name":"jtendo/binpp","owner":"jtendo","description":" :1234: Erlang Binary Pretty Printer","archived":false,"fork":false,"pushed_at":"2021-12-10T08:31:38.000Z","size":43,"stargazers_count":155,"open_issues_count":2,"forks_count":21,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-29T19:08:18.519Z","etag":null,"topics":["binary","binary-data","elixir","elixir-library","erlang","erlang-libraries","pretty-print"],"latest_commit_sha":null,"homepage":"http://jtendo.github.com/binpp/doc","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jtendo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-09-15T22:08:06.000Z","updated_at":"2025-01-02T04:24:11.000Z","dependencies_parsed_at":"2022-09-07T01:52:36.460Z","dependency_job_id":null,"html_url":"https://github.com/jtendo/binpp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtendo%2Fbinpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtendo%2Fbinpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtendo%2Fbinpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtendo%2Fbinpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jtendo","download_url":"https://codeload.github.com/jtendo/binpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393573,"owners_count":20931813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary","binary-data","elixir","elixir-library","erlang","erlang-libraries","pretty-print"],"created_at":"2024-09-24T21:50:59.128Z","updated_at":"2025-04-05T20:09:39.212Z","avatar_url":"https://github.com/jtendo.png","language":"Erlang","readme":"binpp - Erlang Binary Pretty Printer\n===================================\n\nHex.pm: https://hex.pm/packages/binpp\n\n[![Build Status](https://secure.travis-ci.org/jtendo/binpp.png)](http://travis-ci.org/jtendo/binpp)\n\nExample usage:\n\n    1\u003e Bin.\n    \u003c\u003c12,242,207,49,82,69,45,130,212,69,80,88,8,81,23,36,86,7,\n      68,19,133,97,51,216,56,145,88,8,81,...\u003e\u003e\n    2\u003e binpp:pprint(Bin).\n    0000 0C F2 CF 31 52 45 2D 82 D4 45 50 58 08 51 17 24  .òÏ1RE-ÔEPX.Q.$\n    0001 56 07 44 13 85 61 33 D8 38 91 58 08 51 17 24 56  V.D.a3Ø8X.Q.$V\n    0002 0A 14 20 4E 24 16 09 60 F4 0A 15 11 01 30 13 89  .. N$..`ô....0.\n    0003 05 81 0F 09 15 C5 61 33 D8 54 91 52 5D 81 17 24  ....Åa3ØTR].$\n    0004 11 14 60 23 D1 3D 55 80                          ..`#Ñ=U\n    ok\n\nBinpp will use io:format to output the formatted binary by default, however\nthere are options making pprint functions return formatted data instead\nof performing direct IO write:\n\n    1\u003e Bin2 = \u003c\u003c\"foo bar baz\"\u003e\u003e.\n    \u003c\u003c\"foo bar baz\"\u003e\u003e\n    2\u003e binpp:pprint(Bin2, [{return, iolist}]).\n    [[\"0000\",32,\"66 6F 6F 20 62 61 72 20 62 61 7A                \",32,\n      \"foo bar baz\",\"\\n\"]]\n    3\u003e binpp:pprint(Bin2, [{return, binary}]).\n    \u003c\u003c\"0000 66 6F 6F 20 62 61 72 20 62 61 7A                 foo bar baz\\n\"\u003e\u003e\n\nYou may use a custom printer function as well:\n\n    4\u003e binpp:pprint(Bin2, [{printer, fun(O) -\u003e io:format(\"~s~n\", [O]) end}]).\n    0000 66 6F 6F 20 62 61 72 20 62 61 7A                 foo bar baz\n\n    ok\n\nAn additional API is provided for printing binary fragments:\n\n    5\u003e binpp:pprint(Bin2, {0, 3}, []).\n    0000 66 6F 6F                                         foo\n\nAlso, binary byte-to-byte comparsion:\n\n    6\u003e binpp:compare(\u003c\u003c1,2,1024:512,3,4\u003e\u003e, \u003c\u003c1,3,1024:512,5,6\u003e\u003e).\n    -- 02 -- -- -- -- -- -- -- -- -- -- -- -- -- --   -- 03 -- -- -- -- -- -- -- -- -- -- -- -- -- --\n    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n    -- -- 03 04                                       -- -- 05 06\n    ok\n\nPlus a handy little helper:\n\n    7\u003e binpp:compare(\u003c\u003c1,2,255,3,1024:512\u003e\u003e, binpp:from_str(\"01 02 FF CC\")).\n    -- -- -- 03 00 00 00 00 00 00 00 00 00 00 00 00   -- -- -- CC ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??\n    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??\n    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??\n    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??\n    00 00 04 00                                       ?? ?? ?? ??\n    ok\n\n\nEdoc available at http://jtendo.github.com/binpp/doc/.\n\nThat's all folks!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtendo%2Fbinpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjtendo%2Fbinpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtendo%2Fbinpp/lists"}