BitStruct

Software Screenshot:
BitStruct
Software Details:
Version: 0.15.0
Upload Date: 12 May 15
Developer: Joel VanderWerf
Distribution Type: Freeware
Downloads: 203

Rating: 3.0/5 (Total Votes: 2)

Its main use is in defining network protocol packets used for network protocols (IP).

Installation:

For .gem: Run the command gem install bit-struct
For .tgz, unpack and run these commands:
  ruby install.rb config
  ruby install.rb setup
  ruby install.rb install

Features:

  • Extensible with user-defined field classes.
  • Fields are fully introspectable and can be defined programmatically.
  • BitStruct.describe prints out documentation of all the fields of a BitStruct subclass, based on declarations. This is useful for communicating with developers who are not using ruby, but need to talk the same protocols.
  • Fields are inherited by subclasses.
  • BitStruct#inspect and BitStruct#inspect_detailed can be used for prettified display of contents.
  • BitStruct inherits from String, so all the usual methods are available, and string-sharing (copy-on-write) is in effect.
  • Easy access to a "prototype" instance of each BitStruct subclass, from which all instances of that subclass are initialized as a copy (in the absence of other initialization parameters, such as a hash, a string, or a block). See BitStruct.initial_value, and BitStruct#initialize.
  • Easy conversion to and from hashes, using BitStruct#to_h and BitStruct.new.
  • BitStructs can persist using Marshal (a BitStruct is after all just a string) or using YAML (with human readable representation of the fields).
  • Includes tests, examples, and rdoc API documentation.

What is new in this release:

  • Modernize rakefile and gemspec.
  • Switch to minitest.

What is new in version 0.13.4:

  • Packaged as a gem using bones.
  • Added nest fields defined with blocks.
  • Vector length may be specified as argument or :length option.

Limitations:

  • Fields that are not aligned on byte boundaries may cross no more than two bytes boundaries.
  • No variable length fields (except the rest field).

Similar Software

Nimble
Nimble

13 May 15

Collective.js
Collective.js

12 May 15

Collage.js
Collage.js

14 Apr 15

Mixen
Mixen

13 May 15

Comments to BitStruct

Comments not found
Add Comment
Turn on images!