Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/woodruffw/netstring.cr
A library for parsing netstrings in Crystal
https://github.com/woodruffw/netstring.cr
crystal netstring
Last synced: 16 days ago
JSON representation
A library for parsing netstrings in Crystal
- Host: GitHub
- URL: https://github.com/woodruffw/netstring.cr
- Owner: woodruffw
- License: other
- Created: 2018-10-10T04:14:44.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-04T02:01:05.000Z (over 4 years ago)
- Last Synced: 2024-12-19T10:17:30.162Z (17 days ago)
- Topics: crystal, netstring
- Language: Crystal
- Homepage: https://woodruffw.github.io/netstring.cr/
- Size: 30.3 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
netstring.cr
============![license](https://raster.shields.io/badge/license-MIT%20with%20restrictions-green.png)
[![Build Status](https://img.shields.io/github/workflow/status/woodruffw/netstring.cr/CI/master)](https://github.com/woodruffw/netstring.cr/actions?query=workflow%3ACI)A Crystal implementation of [djb's netstrings](https://cr.yp.to/proto/netstrings.txt).
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
netstring:
github: woodruffw/netstring.cr
```## Usage
```crystal
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 ()
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](https://github.com/woodruffw) William Woodruff - creator, maintainer