Add the following code to your project's shard.yml under:
dependencies
to use in production
- OR -
development_dependencies
to use in development
A Crystal implementation of djb's netstrings.
Add this to your application's shard.yml
:
dependencies:
netstring:
github: woodruffw/netstring.cr
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")
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)