netstring.cr
A Crystal implementation of djb's netstrings.
Installation
Add this to your application's shard.yml
:
dependencies:
netstring:
github: woodruffw/netstring.cr
Usage
require "netstring"
# From a source string:
ns = Netstring.parse "3:foo,"
ns.size # => 3
ns.data # => Bytes[102, 111, 111]
ns.to_s # => "foo"
# From an IO:
ns = Netstring.parse IO::Memory.new("bar")
Contributing
- Fork it (https://github.com/woodruffw/netstring/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- woodruffw William Woodruff - creator, maintainer