Sha256: 63dd0594b40a8c432a245c78446bd815a809a74abed71000ffbc72a6460cec4d

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

BitPacker
=========

**bit-packer** provides easy declarative way of analyzing the packed bit 
arrays. See an example:
        
        require "bit-packer"
        
        bp = BitPacker::new(7) do
            number (:alfa) {2}      # length of the entry in bits in block
            boolean :beta
        end
        
        p bp.data
        # will print out #<struct alfa=3, beta=true>
        
You can both read from data struct and write to it:

        bp.data.boolean = false
        bp.data.number = 2
        
        p bp.to_i
        # will print out 4

Contributing
------------

1. Fork it.
2. Create a branch (`git checkout -b 20101220-my-change`).
3. Commit your changes (`git commit -am "Added something"`).
4. Push to the branch (`git push origin 20101220-my-change`).
5. Create an [Issue][2] with a link to your branch.
6. Enjoy a refreshing Diet Coke and wait.

Copyright
---------

Copyright &copy; 2011 [Martin Kozák][3]. See `LICENSE.txt` for
further details.

[2]: http://github.com/martinkozak/bit-packer/issues
[3]: http://www.martinkozak.net/

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bit-packer-0.1.2 README.md
bit-packer-0.1.0 README.md