-per fuzzer run https://github.com/D-Nice/nbaser/runs/934292582 revealed that the 16k test case size threshold is too large, and that it's mostly false positives, that simply take a long time to process. Tried all the available test cases on local machine, which did not hang, they are just misidentified as hangs as afl notes them as hangs if taking too long. |
||
|---|---|---|
| .github | ||
| src | ||
| tests | ||
| .gitignore | ||
| CHANGELOG.md | ||
| LICENSE | ||
| nbaser.nimble | ||
| nimdoc.cfg | ||
| README.md | ||
nbaser
Library allowing for consistent and reversible encode/decode operations between arbitrary unicode character bases. Supports bases from 2 to 256.
Install
$ nimble install nbaser
import in your project and use
import nbaser
const bs58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
echo bs58.decode("1Q2TWHE3GMdB6BZKafqwxXtWAWgFt5Jvm3")
# @[0, 252, 145, 111, 33, 58, 61, 127, 19, 105, 49, 61, 95, 163, 15, 97, 104, 249, 68, 106, 45, 17, 33, 166, 54]
Docs
Available @ https://d-nice.github.io/nbaser/
Includes examples.
Benchmark
Check the benchmarker CI task for current benchmark numbers.
or to test locally
$ nimble benchmark
Notes
This library does not support padding, such as that found in "standard" base32 and base64.
It utilizes the leading zero compression found in base58, thereby supports it and its variants, and does not require padding.
Due to the unicode support, there is quite some performance overhead relatively to just supporting ASCII. It results in up to an order of magnitude slowdown, but should still be fast enough. Check benchmarks.
