Rewritten to use buffers. This has a breaking API change.
Benchmarks
Native OFF:
- Encode: 17,544,586/s → 30,273,037/s (1.72x)
- Decode: 30,008,033/s → 26,686,826/s (0.88x)
Native ON:
- Encode: 27,367,321/s → 216,813,496/s (7.92x)
- Decode: 59,923,405/s → 167,680,012/s (2.79x)