3 ms·
The source map format is tricky. One flaw is that the VLQ encoding is strange and hard to get right. 0 may be encoded as either A or B (?). Even the author miss
by ridiculous_fish 9y ago
The source map format is tricky. One flaw is that the VLQ encoding is strange and hard to get right. 0 may be encoded as either A or B (?). Even the author missed an edge case: -2^31 is wrongly encoded as B (i.e. 0) while the correct encoding 'jgggggE' is wrongly decoded as -1. Try entering them in http://www.murzwin.com/base64vlq.html http://www.murzwin.com/base64vlq.html .
More seriously, the format is unsuitable for random access. It must be fully parsed and held in memory to be used.