A library for parsing netstrings in Crystal
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
spec Initial commit Oct 10, 2018
src Initial commit Oct 10, 2018
.editorconfig Initial commit Oct 10, 2018
.gitignore Initial commit Oct 10, 2018
.travis.yml Initial commit Oct 10, 2018
LICENSE Initial commit Oct 10, 2018
README.md README: Fix CI badge Oct 11, 2018
shard.yml Initial commit Oct 10, 2018

README.md

netstring.cr

Build Status

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

  1. Fork it (https://github.com/woodruffw/netstring/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • woodruffw William Woodruff - creator, maintainer