https://github.com/dearblue/mruby-bitstream
https://github.com/dearblue/mruby-bitstream
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dearblue/mruby-bitstream
- Owner: dearblue
- License: bsd-2-clause
- Created: 2018-10-11T12:49:12.000Z (over 6 years ago)
- Default Branch: wip
- Last Pushed: 2018-10-11T12:54:16.000Z (over 6 years ago)
- Last Synced: 2025-02-12T11:34:47.464Z (4 months ago)
- Language: Ruby
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mruby-bitstream
## つかいかた
```ruby
File.open("xxx.bin", "rb") do |file|
bs = BitStream.new(file)bitsize1 = 5
bits1 = bs.read bitsize1bitsize2 = 19
bits2 = bs.read bitsize2bs.unread bitsize1, bits1
bs.unread bitsize2, bits2bitsize3 = 27
bits3 = bs.read bitsize3
end
```## くみこみかた
`build_config.rb` ファイルに `gem github: "dearblue/mruby-bitstream"` を任意の場所に追加して下さい。
```ruby
# build_config.rbMRuby::Build.new do |conf|
...
conf.gem github: "dearblue/mruby-bitstream"
...
end
```あるいは `mrbgem.rake` ファイルに依存する mrbgem として追加して下さい。
```ruby
# mrbgem.rakeMRuby::Gem::Specification.new("your-mgem") do |spec|
...
spec.add_dependency "mruby-bitstream", github: "dearblue/mruby-bitstream"
...
end
```## Specification
- Package name: mruby-bitstream
- Version: 0.0.0.1.CONCEPT.TRYOUT
- Licensing: [2 clause BSD License](LICENSE)
- Product quality: CONCEPT, ***BUGGY***
- Project page:
- Author: [dearblue](https://github.com/dearblue)
- Support mruby version: ?
- Object code size: +2 kb (without dependencies) (on FreeBSD 11.2 AMD64 with clang-6.0)
- Dependency external mrbgems:
- [mruby-bitset](https://github.com/dearblue/mruby-bitset)
under [2 clause BSD License](https://github.com/dearblue/mruby-bitset/blob/wip/LICENSE)
by [dearblue](https://github.com/dearblue)
- Dependency C libraries: (NONE)