High-performance VLQ source map codec.
Encodes and decodes source map mappings using the Base64 VLQ format as specified in the Source Map v3 specification (ECMA-426).
Features
parallel— enables [encode_parallel] for multi-threaded encoding via rayon. ~1.5x faster for large maps (5K+ lines).
Examples
Decode and re-encode a mappings string:
use ;
let mappings = decode.unwrap;
assert_eq!; // 2 lines
assert_eq!; // first segment
let encoded = encode;
assert_eq!;
Low-level VLQ primitives:
use ;
let mut buf = Vecnew;
vlq_encode;
let = vlq_decode.unwrap;
assert_eq!;