No commit activity in last 3 years
No release in over 3 years
Read binary resource files created with ResourceWriter or resgen.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Project Readme

Ms::BinaryResources Build Status Code Climate

A way to read Microsoft's binary resource files in Ruby.

Installation

Add this line to your application's Gemfile:

gem 'ms-binary-resources'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ms-binary-resources

Usage

reader = Ms::BinaryResources::Reader.new('/path/to/File.resources')
reader.keys
=> ['key1', 'key2', ...]
reader.key? 'key1'
=> true
reader.key? 'keyxx'
=> false
reader['key1']
=> 'some value'
reader.type_of 'key2'
=> :int32
reader['key2']
=> 8675309

Caveats

Currently only string, uint and int value types are supported. Pull requests with additional types are great, include tests!

Thanks

This is largely cribbed off of the Mono Project's class library implementation of ResourceReader and friends.

Contributing

  1. Fork it ( https://github.com/code-lever/ms-binary-resources/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request