https://github.com/dmendel/bindata
BinData - Reading and Writing Binary Data in Ruby
https://github.com/dmendel/bindata
Keywords
binary-analysis declarative-language file-format reverse-engineering ruby
Keywords from Contributors
rubygem crash-reporting ruby-gem rack multithreading rake activerecord rakefile lalr-parser-generator parser-generator
Last synced: about 22 hours ago
JSON representation
Repository metadata
BinData - Reading and Writing Binary Data in Ruby
- Host: GitHub
- URL: https://github.com/dmendel/bindata
- Owner: dmendel
- License: bsd-2-clause
- Created: 2013-05-17T02:27:43.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2026-01-31T15:38:54.000Z (about 1 month ago)
- Last Synced: 2026-02-24T06:35:13.262Z (7 days ago)
- Topics: binary-analysis, declarative-language, file-format, reverse-engineering, ruby
- Language: Ruby
- Homepage:
- Size: 1.52 MB
- Stars: 625
- Watchers: 17
- Forks: 56
- Open Issues: 3
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.rdoc
- License: LICENSE
README.md
What is BinData?
Do you ever find yourself writing code like this?
io = File.open(...)
len = io.read(2).unpack("v")
name = io.read(len)
width, height = io.read(8).unpack("VV")
puts "Rectangle #{name} is #{width} x #{height}"
It’s ugly, violates DRY and doesn't feel like Ruby.
There is a better way. Here’s how you’d write the above using BinData.
class Rectangle < BinData::Record
endian :little
uint16 :len
string :name, :read_length => :len
uint32 :width
uint32 :height
end
io = File.open(...)
r = Rectangle.read(io)
puts "Rectangle #{r.name} is #{r.width} x #{r.height}"
BinData provides a declarative way to read and write structured binary data.
This means the programmer specifies what the format of the binary
data is, and BinData works out how to read and write data in this
format. It is an easier (and more readable) alternative to
ruby's #pack and #unpack methods.
BinData makes it easy to create new data types. It supports all the common
primitive datatypes that are found in structured binary data formats. Support
for dependent and variable length fields is built in.
Installation
$ gem install bindata
Documentation
Contact
If you have any queries / bug reports / suggestions, please contact me
(Dion Mendel) via email at bindata@dmau.org
Owner metadata
- Name: Dion Mendel
- Login: dmendel
- Email:
- Kind: user
- Description:
- Website:
- Location: Australia/Perth
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/38263?v=4
- Repositories: 1
- Last ynced at: 2023-07-12T02:01:41.500Z
- Profile URL: https://github.com/dmendel
GitHub Events
Total
- Pull request event: 2
- Fork event: 4
- Issues event: 2
- Watch event: 39
- Issue comment event: 4
- Push event: 9
- Gollum event: 2
- Create event: 1
Last Year
- Fork event: 2
- Issues event: 2
- Watch event: 30
- Issue comment event: 2
- Push event: 8
- Gollum event: 1
- Create event: 1
Committers metadata
Last synced: 2 days ago
Total Commits: 614
Total Committers: 13
Avg Commits per committer: 47.231
Development Distribution Score (DDS): 0.482
Commits in past year: 15
Committers in past year: 1
Avg Commits per committer in past year: 15.0
Development Distribution Score (DDS) in past year: 0.0
| Name | Commits | |
|---|---|---|
| dmendel | d****l@7****6 | 318 |
| Dion Mendel | d****n@l****m | 192 |
| Dion Mendel | b****a@d****o | 91 |
| Peter Goldstein | p****n@g****m | 2 |
| Charles Oliver Nutter | h****s@h****m | 2 |
| Aaron Patterson | a****n@g****m | 2 |
| cdelafuente-r7 | c****e@r****m | 1 |
| Patrick Linnane | p****k@l****o | 1 |
| Mark Young | m****g@a****o | 1 |
| Cédric Boutillier | b****l@d****g | 1 |
| Brent Cook | b****b@g****m | 1 |
| Bertrand Paquet | b****t@g****m | 1 |
| Akira Matsuda | r****e@d****p | 1 |
Committer domains:
- dio.jp: 1
- debian.org: 1
- atg.auto: 1
- linnane.io: 1
- rapid7.com: 1
- headius.com: 1
- dm9.info: 1
- lostrealm.com: 1
Issue and Pull Request metadata
Last synced: 7 days ago
Total issues: 90
Total pull requests: 27
Average time to close issues: about 1 month
Average time to close pull requests: 24 days
Total issue authors: 60
Total pull request authors: 20
Average comments per issue: 2.82
Average comments per pull request: 2.04
Merged pull request: 11
Bot issues: 0
Bot pull requests: 0
Past year issues: 2
Past year pull requests: 1
Past year average time to close issues: 7 days
Past year average time to close pull requests: N/A
Past year issue authors: 2
Past year pull request authors: 1
Past year average comments per issue: 4.5
Past year average comments per pull request: 0.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- Tails (4)
- lilijreey (3)
- zeroSteiner (3)
- michaeljpetter (3)
- byteit101 (3)
- cowquant (3)
- ccoenen (3)
- adfoster-r7 (3)
- peterjmorgan (3)
- aidansteele (2)
- hopesea (2)
- andywatts (2)
- vihai (2)
- madprogrammer (2)
- tan-wei (2)
Top Pull Request Authors
- p-linnane (2)
- dduugg (2)
- petergoldstein (2)
- tenderlove (2)
- franzliedke (2)
- mark-young-atg (2)
- zeroSteiner (2)
- S-YOU (1)
- ghost (1)
- cdelafuente-r7 (1)
- hiroeorz (1)
- amatsuda (1)
- jeremyevans (1)
- masarakki (1)
- gogainda (1)
Top Issue Labels
- question (27)
- bug (6)
- enhancement (4)
- wontfix (1)
- invalid (1)
- wishlist (1)
Top Pull Request Labels
- enhancement (1)
Package metadata
- Total packages: 13
-
Total downloads:
- rubygems: 254,149,521 total
- Total docker downloads: 1,846,026,600
- Total dependent packages: 138 (may contain duplicates)
- Total dependent repositories: 3,026 (may contain duplicates)
- Total versions: 161
- Total maintainers: 1
- Total advisories: 1
gem.coop: bindata
BinData is a declarative way to read and write binary file formats. This means the programmer specifies *what* the format of the binary data is, and BinData works out *how* to read and write data in this format. It is an easier ( and more readable ) alternative to ruby's #pack and #unpack methods.
- Homepage: https://github.com/dmendel/bindata
- Documentation: http://www.rubydoc.info/gems/bindata/
- Licenses: BSD-2-Clause
- Latest release: 2.5.1 (published 11 months ago)
- Last Synced: 2026-03-02T03:03:32.304Z (1 day ago)
- Versions: 59
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 127,064,433 Total
- Docker Downloads: 923,013,300
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Docker downloads count: 0.058%
- Average: 0.065%
- Downloads: 0.202%
- Maintainers (1)
rubygems.org: bindata
BinData is a declarative way to read and write binary file formats. This means the programmer specifies *what* the format of the binary data is, and BinData works out *how* to read and write data in this format. It is an easier ( and more readable ) alternative to ruby's #pack and #unpack methods.
- Homepage: https://github.com/dmendel/bindata
- Documentation: http://www.rubydoc.info/gems/bindata/
- Licenses: BSD-2-Clause
- Latest release: 2.5.1 (published 11 months ago)
- Last Synced: 2026-03-02T09:03:58.397Z (1 day ago)
- Versions: 59
- Dependent Packages: 138
- Dependent Repositories: 3,026
- Downloads: 127,085,088 Total
- Docker Downloads: 923,013,300
-
Rankings:
- Docker downloads count: 0.138%
- Downloads: 0.223%
- Dependent packages count: 0.25%
- Dependent repos count: 0.57%
- Average: 1.196%
- Stargazers count: 2.379%
- Forks count: 3.618%
- Maintainers (1)
- Advisories:
proxy.golang.org: github.com/dmendel/bindata
- Homepage:
- Documentation: https://pkg.go.dev/github.com/dmendel/bindata#section-documentation
- Licenses: bsd-2-clause
- Latest release: v2.5.1+incompatible (published 11 months ago)
- Last Synced: 2026-02-26T11:01:24.164Z (5 days ago)
- Versions: 33
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Stargazers count: 2.518%
- Forks count: 3.28%
- Average: 6.544%
- Dependent packages count: 9.576%
- Dependent repos count: 10.802%
debian-11: ruby-bindata
- Homepage: https://github.com/dmendel/bindata
- Documentation: https://packages.debian.org/bullseye/ruby-bindata
- Licenses:
- Latest release: 2.4.8-1 (published 20 days ago)
- Last Synced: 2026-02-13T08:18:49.137Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-10: ruby-bindata
- Homepage: http://github.com/dmendel/bindata
- Documentation: https://packages.debian.org/buster/ruby-bindata
- Licenses:
- Latest release: 2.3.5-1 (published 20 days ago)
- Last Synced: 2026-02-13T04:19:27.761Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-13: ruby-bindata
- Homepage: https://github.com/dmendel/bindata
- Documentation: https://packages.debian.org/trixie/ruby-bindata
- Licenses:
- Latest release: 2.4.14-1 (published 19 days ago)
- Last Synced: 2026-02-13T13:13:41.197Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-12: ruby-bindata
- Homepage: https://github.com/dmendel/bindata
- Documentation: https://packages.debian.org/bookworm/ruby-bindata
- Licenses:
- Latest release: 2.4.14-1 (published 18 days ago)
- Last Synced: 2026-02-12T23:25:57.823Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
Dependencies
- coveralls >= 0 development
- minitest > 5.0.0, < 5.12.0 development
- rake >= 0 development
- actions/checkout v2 composite
- ruby/setup-ruby v1 composite
Score: 30.472778691432445